-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broken mir, trivial loop with -Zvalidate-mir #73860
Comments
Oh that is interesting:
@nikomatsakis @eddyb is that expected? The other way around would make sense (assigning a |
Yeah, that MIR looks really broken:
|
This is probably due to this line:
Break , Continue and Return shouldn't have this, since they have type ! , not () .
|
This is a super old issue going back all the way to the initial MIR implementation and I’m somewhat confident is documented somewhere, though I cannot find an issue for this. IIRC these invalid assignments only happen in unreachable basic blocks, so however wrong it looks in isolation, it is dead code and I think it never was a priority to fix either generation or the MIR validation we had back then for exactly that reason. Looks like |
…hewjasper Don't assign `()` to `!` MIR locals Implements the fix described in rust-lang#73860 (comment). Fixes rust-lang#73860 r? @matthewjasper
Code
The code fails to pass
-Zvalidate-mir
Meta
Repo is at c86039b
Error output
Backtrace
The text was updated successfully, but these errors were encountered: