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