1 error[E0658]: `while` is not allowed in a `const`
2 --> $DIR/infinite_loop.rs:7:9
6 LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
12 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
13 = help: add `#![feature(const_loop)]` to the crate attributes to enable
14 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
16 error[E0658]: `if` is not allowed in a `const`
17 --> $DIR/infinite_loop.rs:9:17
19 LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
23 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
25 warning: Constant evaluating a complex constant, this might take some time
26 --> $DIR/infinite_loop.rs:4:18
31 LL | | let mut n = 113383; // #20 in https://oeis.org/A006884
38 error[E0080]: evaluation of constant value failed
39 --> $DIR/infinite_loop.rs:9:20
41 LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
42 | ^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate
44 error: aborting due to 3 previous errors
46 Some errors have detailed explanations: E0080, E0658.
47 For more information about an error, try `rustc --explain E0080`.