Auto merge of #117335 - workingjubilee:rollup-jsomm41, r=workingjubilee
Rollup of 5 pull requests Successful merges: - #115773 (tvOS simulator support on Apple Silicon for rustc) - #117162 (Remove `cfg_match` from the prelude) - #117311 (-Zunpretty help: add missing possible values) - #117316 (Mark constructor of `BinaryHeap` as const fn) - #117319 (explain why we don't inline when target features differ) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
2106b63b7b
10 changed files with 138 additions and 92 deletions
|
@ -439,6 +439,11 @@ impl<'tcx> Inliner<'tcx> {
|
|||
}
|
||||
|
||||
if callee_attrs.target_features != self.codegen_fn_attrs.target_features {
|
||||
// In general it is not correct to inline a callee with target features that are a
|
||||
// subset of the caller. This is because the callee might contain calls, and the ABI of
|
||||
// those calls depends on the target features of the surrounding function. By moving a
|
||||
// `Call` terminator from one MIR body to another with more target features, we might
|
||||
// change the ABI of that call!
|
||||
return Err("incompatible target features");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue