rust/tests/ui/consts/const-eval/infinite_loop.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
803 B
Plaintext
Raw Normal View History

error: constant evaluation is taking a long time
2023-01-03 23:04:03 -06:00
--> $DIR/infinite_loop.rs:6:9
|
2023-01-03 23:04:03 -06:00
LL | / while n != 0 {
LL | |
LL | | n = if n % 2 == 0 { n / 2 } else { 3 * n + 1 };
2023-01-03 23:04:03 -06:00
LL | | }
| |_________^
|
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
If your compilation actually takes a long time, you can safely allow the lint.
help: the constant being evaluated
--> $DIR/infinite_loop.rs:4:18
|
LL | let _ = [(); {
| __________________^
LL | | let mut n = 113383; // #20 in https://oeis.org/A006884
LL | | while n != 0 {
LL | |
... |
LL | | n
LL | | }];
| |_____^
= note: `#[deny(long_running_const_eval)]` on by default
2020-06-25 19:43:48 -05:00
error: aborting due to previous error