blob: 869f0b981af7d881e4dce06fc6f4cd9fe531b727 (
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 `while` is not allowed in a `const`
n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
x = &0; // Materialize a new AllocId
}
0
}];
}
|