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 12:48:14 +00: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-04 05:04:03 +00:00
n = (n + 1) % 5;
2018-08-18 12:48:14 +00:00
x = &0; // Materialize a new AllocId
}
0
}];
}