File tree 1 file changed +5
-5
lines changed
compiler/rustc_mir_transform/src
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -502,11 +502,6 @@ fn process_blocks<'tcx, I: Inliner<'tcx>>(
502
502
let span = trace_span ! ( "process_blocks" , %callsite. callee, ?bb) ;
503
503
let _guard = span. enter ( ) ;
504
504
505
- if !inliner. should_inline_for_callee ( callsite. callee . def_id ( ) ) {
506
- debug ! ( "not enabled" ) ;
507
- continue ;
508
- }
509
-
510
505
match try_inlining ( inliner, caller_body, & callsite) {
511
506
Err ( reason) => {
512
507
debug ! ( "not-inlined {} [{}]" , callsite. callee, reason) ;
@@ -541,6 +536,11 @@ fn resolve_callsite<'tcx, I: Inliner<'tcx>>(
541
536
if let TerminatorKind :: Call { ref func, fn_span, .. } = terminator. kind {
542
537
let func_ty = func. ty ( caller_body, tcx) ;
543
538
if let ty:: FnDef ( def_id, args) = * func_ty. kind ( ) {
539
+ if !inliner. should_inline_for_callee ( def_id) {
540
+ debug ! ( "not enabled" ) ;
541
+ return None ;
542
+ }
543
+
544
544
// To resolve an instance its args have to be fully normalized.
545
545
let args = tcx. try_normalize_erasing_regions ( inliner. typing_env ( ) , args) . ok ( ) ?;
546
546
let callee =
You can’t perform that action at this time.
0 commit comments