summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/issue-52475.rs
blob: 307c1a66834105e316e559ebd2607a5cc75c6f54 (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 { //~ ERROR evaluation of constant value failed [E0080]
            n = (n + 1) % 5;
            x = &0; // Materialize a new AllocId
        }
        0
    }];
}