rust
rust copied to clipboard
Fix validation on substituted callee bodies in MIR inliner
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
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
Some changes occurred to MIR optimizations
cc @rust-lang/wg-mir-opt
r? compiler
@rustbot ready
r=me after rebase
@bors r=cjgillot
:pushpin: Commit 78ebb939c1f7135bcc851ba9d4d091d40bb7fe64 has been approved by cjgillot
It is now in the queue for this repository.