rust/tests/ui/consts/const-eval/issue-52475.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
262 B
Rust
Raw Normal View History

2018-08-18 07:48:14 -05:00
fn main() {
let _ = [(); {
let mut x = &0;
let mut n = 0;
2023-01-03 23:04:03 -06:00
while n < 5 { //~ ERROR evaluation of constant value failed [E0080]
n = (n + 1) % 5;
2018-08-18 07:48:14 -05:00
x = &0; // Materialize a new AllocId
}
0
}];
}