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