File tree 1 file changed +4
-4
lines changed
compiler/rustc_mir_transform/src
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -280,10 +280,6 @@ impl<'tcx> Inliner<'tcx> {
280
280
}
281
281
}
282
282
283
- if self . tcx . has_attr ( callsite. callee . def_id ( ) , sym:: rustc_no_mir_inline) {
284
- return Err ( "found #[rustc_no_mir_inline] on callee" ) ;
285
- }
286
-
287
283
let old_blocks = caller_body. basic_blocks . next_index ( ) ;
288
284
self . inline_call ( caller_body, callsite, callee_body) ;
289
285
let new_blocks = old_blocks..caller_body. basic_blocks . next_index ( ) ;
@@ -418,6 +414,10 @@ impl<'tcx> Inliner<'tcx> {
418
414
callee_attrs : & CodegenFnAttrs ,
419
415
cross_crate_inlinable : bool ,
420
416
) -> Result < ( ) , & ' static str > {
417
+ if self . tcx . has_attr ( callsite. callee . def_id ( ) , sym:: rustc_no_mir_inline) {
418
+ return Err ( "#[rustc_no_mir_inline]" ) ;
419
+ }
420
+
421
421
if let InlineAttr :: Never = callee_attrs. inline {
422
422
return Err ( "never inline hint" ) ;
423
423
}
You can’t perform that action at this time.
0 commit comments