blob: 629d1f02a30f3d88f4db73470e3b0289a80fe3a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// check-pass
#![feature(const_eval_limit)]
// This needs to be higher than the number of loop iterations since each pass through the loop may
// hit more than one terminator.
#![const_eval_limit="4000"]
const X: usize = {
let mut x = 0;
while x != 1000 {
x += 1;
}
x
};
fn main() {
assert_eq!(X, 1000);
}
|