rust icon indicating copy to clipboard operation
rust copied to clipboard

Fix validation on substituted callee bodies in MIR inliner

Open compiler-errors opened this issue 5 months ago • 3 comments

When inlining a coroutine, we will substitute the MIR body with the args of the call. There is code in the MIR validator that attempts to prevent query cycles, and will use the coroutine body directly when it detects that's the body that's being validated. That means that when inlining a coroutine body that has been substituted, it may no longer be parameterized over the original args of the coroutine, which will lead to substitution ICEs.

Fixes #119064

compiler-errors avatar Mar 08 '24 01:03 compiler-errors

r? @Nadrieril

rustbot has assigned @Nadrieril. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Mar 08 '24 01:03 rustbot

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustbot avatar Mar 08 '24 01:03 rustbot

r? compiler

Nadrieril avatar Mar 08 '24 07:03 Nadrieril

@rustbot ready

compiler-errors avatar Mar 19 '24 16:03 compiler-errors

r=me after rebase

cjgillot avatar Mar 22 '24 19:03 cjgillot

@bors r=cjgillot

compiler-errors avatar Mar 23 '24 00:03 compiler-errors

:pushpin: Commit 78ebb939c1f7135bcc851ba9d4d091d40bb7fe64 has been approved by cjgillot

It is now in the queue for this repository.

bors avatar Mar 23 '24 00:03 bors