2019-12-10 23:27:53 -06:00
|
|
|
error[E0658]: `while` is not allowed in a `const`
|
2020-03-17 18:08:28 -05:00
|
|
|
--> $DIR/issue-52475.rs:5:9
|
2019-11-06 14:29:30 -06:00
|
|
|
|
|
|
|
|
LL | / while n < 5 {
|
|
|
|
LL | |
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | | n = (n + 1) % 5;
|
2018-08-18 07:48:14 -05:00
|
|
|
LL | | x = &0; // Materialize a new AllocId
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
2019-12-10 23:27:53 -06:00
|
|
|
|
|
2020-02-07 06:07:02 -06:00
|
|
|
= note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
|
2019-12-10 23:27:53 -06:00
|
|
|
= help: add `#![feature(const_loop)]` to the crate attributes to enable
|
|
|
|
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
|
2018-08-18 07:48:14 -05:00
|
|
|
|
2018-09-07 03:53:31 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2020-03-17 18:08:28 -05:00
|
|
|
--> $DIR/issue-52475.rs:7:17
|
2018-08-18 07:48:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | n = (n + 1) % 5;
|
2020-03-17 18:08:28 -05:00
|
|
|
| ^^^^^^^^^^^ exceeded interpreter time limit
|
2018-08-18 07:48:14 -05:00
|
|
|
|
2019-11-09 11:29:57 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2018-08-18 07:48:14 -05:00
|
|
|
|
2019-12-10 23:27:53 -06:00
|
|
|
Some errors have detailed explanations: E0080, E0658.
|
2019-11-09 11:29:57 -06:00
|
|
|
For more information about an error, try `rustc --explain E0080`.
|