summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/issue-52475.rs
blob: ce65407bbab0b5d928795c8b4fdc82297aac8625 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let _ = [(); {
        let mut x = &0;
        let mut n = 0;
        while n < 5 {
            n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
            x = &0; // Materialize a new AllocId
        }
        0
    }];
}