rust/compiler/rustc_mir_transform
bors 6b290367ec Auto merge of #113802 - cjgillot:check-debuginfo, r=compiler-errors
Substitute types before checking inlining compatibility.

Addresses https://github.com/rust-lang/rust/issues/112332 and https://github.com/rust-lang/rust/issues/113781

I don't have a minimal test, but I this seems to remove the ICE locally.

This whole pre-inlining validation mirrors the "real" MIR validation pass to verify that inlined MIR will still pass validation.
The debuginfo loop is added because MIR validation check projections in debuginfo.
Likewise, MIR validation only checks `is_subtype`, so there is no reason for a stronger check.

The types were not being substituted in `check_equal`, so we were not bailing out of inlining if the substituted MIR callee body would not pass validation.
2023-07-21 09:14:55 +00:00
..
src Auto merge of #113802 - cjgillot:check-debuginfo, r=compiler-errors 2023-07-21 09:14:55 +00:00
Cargo.toml Migrate mir_transform to translatable diagnostics 2023-05-02 16:24:18 +01:00
messages.ftl Add note about unsafe functions body not being unsafe 2023-06-13 15:48:57 +02:00