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.

13 lines
274 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;
while n < 5 {
//~^ ERROR: constant evaluation is taking a long time
2023-01-03 23:04:03 -06:00
n = (n + 1) % 5;
2018-08-18 07:48:14 -05:00
x = &0; // Materialize a new AllocId
}
0
}];
}