]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-52475.rs
2e3d6fb9e84befe4fece3c50e528039ae63d45eb
[rust.git] / src / test / ui / consts / const-eval / issue-52475.rs
1 #![feature(const_let)]
2
3 fn main() {
4     let _ = [(); {
5         //~^ WARNING Constant evaluating a complex constant, this might take some time
6         let mut x = &0;
7         let mut n = 0;
8         while n < 5 { //~ ERROR constant contains unimplemented expression type
9             n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
10             x = &0; // Materialize a new AllocId
11         }
12         0
13     }];
14 }