rust/src/test/ui/consts/const-eval/issue-52475.stderr

25 lines
853 B
Plaintext
Raw Normal View History

error[E0658]: `while` is not allowed in a `const`
2020-03-17 18:08:28 -05:00
--> $DIR/issue-52475.rs:5:9
|
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 | | }
| |_________^
|
2020-02-07 06:07:02 -06:00
= note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
= 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
error: aborting due to 2 previous errors
2018-08-18 07:48:14 -05:00
Some errors have detailed explanations: E0080, E0658.
For more information about an error, try `rustc --explain E0080`.