We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 615d0f2 commit f7985afCopy full SHA for f7985af
compiler/rustc_mir_transform/src/inline.rs
@@ -439,6 +439,11 @@ impl<'tcx> Inliner<'tcx> {
439
}
440
441
if callee_attrs.target_features != self.codegen_fn_attrs.target_features {
442
+ // In general it is not correct to inline a callee with target features that are a
443
+ // subset of the caller. This is because the callee might contain calls, and the ABI of
444
+ // those calls depends on the target features of the surrounding function. By moving a
445
+ // `Call` terminator from one MIR body to another with more target features, we might
446
+ // change the ABI of that call!
447
return Err("incompatible target features");
448
449
0 commit comments