@@ -606,14 +606,14 @@ fn try_inlining<'tcx, I: Inliner<'tcx>>(
606
606
ty:: EarlyBinder :: bind ( callee_body. clone ( ) ) ,
607
607
) else {
608
608
debug ! ( "failed to normalize callee body" ) ;
609
- return Err ( "implementation limitation" ) ;
609
+ return Err ( "implementation limitation -- could not normalize callee body " ) ;
610
610
} ;
611
611
612
612
// Normally, this shouldn't be required, but trait normalization failure can create a
613
613
// validation ICE.
614
614
if !validate_types ( tcx, inliner. typing_env ( ) , & callee_body, & caller_body) . is_empty ( ) {
615
615
debug ! ( "failed to validate callee body" ) ;
616
- return Err ( "implementation limitation" ) ;
616
+ return Err ( "implementation limitation -- callee body failed validation " ) ;
617
617
}
618
618
619
619
// Check call signature compatibility.
@@ -622,8 +622,7 @@ fn try_inlining<'tcx, I: Inliner<'tcx>>(
622
622
let output_type = callee_body. return_ty ( ) ;
623
623
if !util:: sub_types ( tcx, inliner. typing_env ( ) , output_type, destination_ty) {
624
624
trace ! ( ?output_type, ?destination_ty) ;
625
- debug ! ( "failed to normalize return type" ) ;
626
- return Err ( "implementation limitation" ) ;
625
+ return Err ( "implementation limitation -- return type mismatch" ) ;
627
626
}
628
627
if callsite. fn_sig . abi ( ) == ExternAbi :: RustCall {
629
628
// FIXME: Don't inline user-written `extern "rust-call"` functions,
@@ -653,7 +652,7 @@ fn try_inlining<'tcx, I: Inliner<'tcx>>(
653
652
if !util:: sub_types ( tcx, inliner. typing_env ( ) , input_type, arg_ty) {
654
653
trace ! ( ?arg_ty, ?input_type) ;
655
654
debug ! ( "failed to normalize tuple argument type" ) ;
656
- return Err ( "implementation limitation" ) ;
655
+ return Err ( "implementation limitation -- arg mismatch " ) ;
657
656
}
658
657
}
659
658
} else {
@@ -663,7 +662,7 @@ fn try_inlining<'tcx, I: Inliner<'tcx>>(
663
662
if !util:: sub_types ( tcx, inliner. typing_env ( ) , input_type, arg_ty) {
664
663
trace ! ( ?arg_ty, ?input_type) ;
665
664
debug ! ( "failed to normalize argument type" ) ;
666
- return Err ( "implementation limitation" ) ;
665
+ return Err ( "implementation limitation -- arg mismatch " ) ;
667
666
}
668
667
}
669
668
}
@@ -693,13 +692,13 @@ fn check_mir_is_available<'tcx, I: Inliner<'tcx>>(
693
692
// won't cause cycles on this.
694
693
if !inliner. tcx ( ) . is_mir_available ( callee_def_id) {
695
694
debug ! ( "item MIR unavailable" ) ;
696
- return Err ( "implementation limitation" ) ;
695
+ return Err ( "implementation limitation -- MIR unavailable " ) ;
697
696
}
698
697
}
699
698
// These have no own callable MIR.
700
699
InstanceKind :: Intrinsic ( _) | InstanceKind :: Virtual ( ..) => {
701
700
debug ! ( "instance without MIR (intrinsic / virtual)" ) ;
702
- return Err ( "implementation limitation" ) ;
701
+ return Err ( "implementation limitation -- cannot inline intrinsic " ) ;
703
702
}
704
703
705
704
// FIXME(#127030): `ConstParamHasTy` has bad interactions with
@@ -709,7 +708,7 @@ fn check_mir_is_available<'tcx, I: Inliner<'tcx>>(
709
708
// substituted.
710
709
InstanceKind :: DropGlue ( _, Some ( ty) ) if ty. has_type_flags ( TypeFlags :: HAS_CT_PARAM ) => {
711
710
debug ! ( "still needs substitution" ) ;
712
- return Err ( "implementation limitation" ) ;
711
+ return Err ( "implementation limitation -- HACK for dropping polymorphic type " ) ;
713
712
}
714
713
715
714
// This cannot result in an immediate cycle since the callee MIR is a shim, which does
0 commit comments