]> git.lizzy.rs Git - rust.git/commit
Don't rerun Mir passes when inlining
authorNiko Matsakis <niko@alum.mit.edu>
Sat, 20 Oct 2018 20:18:17 +0000 (16:18 -0400)
committerWesley Wiser <wwiser@gmail.com>
Tue, 23 Oct 2018 02:45:36 +0000 (22:45 -0400)
commit37e1d2975e1002f0718552554055647392e46f0d
tree325e5684e64e52ea2cef7c01157ed97958e40721
parent22cc2ae8057d14e980b7c784e1eb2eee26b59e7d
Don't rerun Mir passes when inlining

When inlining a function using the Mir inliner, we shouldn't rerun the
various Mir passes on it because the Mir has already been lowered and
that wil break various early Mir passes.

The issue in #50411 is that we've inlined a function with promotions
whose Mir has already been lowered. The promotions are then copied into
the local function and we begin to run passes on their lowered Mir
which causes the ICE.

Fixes #50411
src/librustc/mir/mod.rs
src/librustc_mir/transform/mod.rs
src/test/ui/issues/issue-50411.rs [new file with mode: 0644]