Fix const prop ICE
we used to erase the local just before we tried to read it for diagnostics
This commit is contained in:
parent
0cd7ff7ddf
commit
ee8dd4e3cc
2 changed files with 30 additions and 19 deletions
9
src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs
Normal file
9
src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// check-pass
|
||||
|
||||
pub struct Fixed64(i64);
|
||||
|
||||
pub fn div(f: Fixed64) {
|
||||
f.0 / 0;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue