Rustc creates invalid mir for core::cell::BorrowRef::new #49327
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Repro (copy of necessary parts of libcore/cell.rs): https://play.rust-lang.org/?gist=41cc5138c7765666a646bbcb09748ff3&version=stable
Notice the second statement in bb1:
_4 = discriminant(_2);
_2 is of typeusize
on which you are not allowed to the discriminant._4
isn't used anywhere. This has been detected while fixing miri.cc @solson @oli-obk
The text was updated successfully, but these errors were encountered: