rust/tests/ui/consts/const-eval/issue-52475.rs
2023-01-23 23:56:22 +00:00

12 lines
262 B
Rust

fn main() {
let _ = [(); {
let mut x = &0;
let mut n = 0;
while n < 5 { //~ ERROR evaluation of constant value failed [E0080]
n = (n + 1) % 5;
x = &0; // Materialize a new AllocId
}
0
}];
}