@@ -8,12 +8,12 @@ use rustc_middle::mir::{UnwindTerminateReason, traversal};
88use rustc_middle:: ty:: layout:: { FnAbiOf , HasTyCtxt , TyAndLayout } ;
99use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt , TypeFoldable , TypeVisitableExt } ;
1010use rustc_middle:: { bug, mir, span_bug} ;
11- use rustc_target:: abi:: call:: { FnAbi , PassMode } ;
1211use rustc_session:: lint;
12+ use rustc_target:: abi:: call:: { FnAbi , PassMode } ;
1313use tracing:: { debug, instrument} ;
1414
15- use crate :: traits:: * ;
1615use crate :: base;
16+ use crate :: traits:: * ;
1717
1818mod analyze;
1919mod block;
@@ -240,16 +240,19 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
240240
241241 if layout. size . bytes ( ) >= MIN_DANGEROUS_SIZE {
242242 let ( size_quantity, size_unit) = human_readable_bytes ( layout. size . bytes ( ) ) ;
243- cx. tcx ( ) . node_span_lint (
244- lint:: builtin:: DANGEROUS_STACK_ALLOCATION ,
245- CRATE_HIR_ID ,
246- decl. source_info . span ,
247- |lint| {
248- lint. primary_message ( format ! ( "allocation of size: {:.2} {} exceeds most system architecture limits" , size_quantity, size_unit) ) ;
249- } ,
250- ) ;
243+ cx. tcx ( ) . node_span_lint (
244+ lint:: builtin:: DANGEROUS_STACK_ALLOCATION ,
245+ CRATE_HIR_ID ,
246+ decl. source_info . span ,
247+ |lint| {
248+ lint. primary_message ( format ! (
249+ "allocation of size: {:.2} {} exceeds most system architecture limits" ,
250+ size_quantity, size_unit
251+ ) ) ;
252+ } ,
253+ ) ;
251254 }
252-
255+
253256 if local == mir:: RETURN_PLACE {
254257 match fx. fn_abi . ret . mode {
255258 PassMode :: Indirect { .. } => {
0 commit comments