@@ -8,12 +8,12 @@ use rustc_middle::mir::{UnwindTerminateReason, traversal};
8
8
use rustc_middle:: ty:: layout:: { FnAbiOf , HasTyCtxt , HasTypingEnv , TyAndLayout } ;
9
9
use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt , TypeFoldable , TypeVisitableExt } ;
10
10
use rustc_middle:: { bug, mir, span_bug} ;
11
- use rustc_target:: callconv:: { FnAbi , PassMode } ;
12
11
use rustc_session:: lint;
12
+ use rustc_target:: callconv:: { FnAbi , PassMode } ;
13
13
use tracing:: { debug, instrument} ;
14
14
15
- use crate :: traits:: * ;
16
15
use crate :: base;
16
+ use crate :: traits:: * ;
17
17
18
18
mod analyze;
19
19
mod block;
@@ -251,16 +251,19 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
251
251
252
252
if layout. size . bytes ( ) >= MIN_DANGEROUS_SIZE {
253
253
let ( size_quantity, size_unit) = human_readable_bytes ( layout. size . bytes ( ) ) ;
254
- cx. tcx ( ) . node_span_lint (
255
- lint:: builtin:: DANGEROUS_STACK_ALLOCATION ,
256
- CRATE_HIR_ID ,
257
- decl. source_info . span ,
258
- |lint| {
259
- lint. primary_message ( format ! ( "allocation of size: {:.2} {} exceeds most system architecture limits" , size_quantity, size_unit) ) ;
260
- } ,
261
- ) ;
254
+ cx. tcx ( ) . node_span_lint (
255
+ lint:: builtin:: DANGEROUS_STACK_ALLOCATION ,
256
+ CRATE_HIR_ID ,
257
+ decl. source_info . span ,
258
+ |lint| {
259
+ lint. primary_message ( format ! (
260
+ "allocation of size: {:.2} {} exceeds most system architecture limits" ,
261
+ size_quantity, size_unit
262
+ ) ) ;
263
+ } ,
264
+ ) ;
262
265
}
263
-
266
+
264
267
if local == mir:: RETURN_PLACE {
265
268
match fx. fn_abi . ret . mode {
266
269
PassMode :: Indirect { .. } => {
0 commit comments