]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-52475.rs
Merge pull request #2 from rust-lang/master
[rust.git] / src / test / ui / consts / const-eval / issue-52475.rs
1 fn main() {
2     let _ = [(); {
3         let mut x = &0;
4         let mut n = 0;
5         while n < 5 {
6         //~^ ERROR `while` is not allowed in a `const`
7             n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
8             x = &0; // Materialize a new AllocId
9         }
10         0
11     }];
12 }