2019-12-14 11:51:56 -06:00
|
|
|
#![feature(const_eval_limit)]
|
2020-05-21 14:49:38 -05:00
|
|
|
#![const_eval_limit = "500"]
|
2019-12-13 02:38:07 -06:00
|
|
|
|
2020-03-17 18:08:28 -05:00
|
|
|
const X: usize = {
|
|
|
|
let mut x = 0;
|
|
|
|
while x != 1000 {
|
2022-09-21 06:05:20 -05:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-03-17 18:08:28 -05:00
|
|
|
x += 1;
|
|
|
|
}
|
2019-12-13 02:38:07 -06:00
|
|
|
|
2020-03-17 18:08:28 -05:00
|
|
|
x
|
|
|
|
};
|
2019-12-13 02:38:07 -06:00
|
|
|
|
2020-03-17 18:08:28 -05:00
|
|
|
fn main() {
|
|
|
|
assert_eq!(X, 1000);
|
2019-12-13 02:38:07 -06:00
|
|
|
}
|