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