blob: 68e7fdb12517b0f93ab17883864fd02c6857e74a [file] [log] [blame]
error[E0019]: constant contains unimplemented expression type
--> $DIR/infinite_loop.rs:7:15
|
LL | while n != 0 {
| ^^^^^^
error[E0019]: constant contains unimplemented expression type
--> $DIR/infinite_loop.rs:7:9
|
LL | / while n != 0 {
LL | |
LL | |
LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
LL | |
LL | | }
| |_________^
warning: Constant evaluating a complex constant, this might take some time
--> $DIR/infinite_loop.rs:4:18
|
LL | let _ = [(); {
| __________________^
LL | |
LL | | let mut n = 113383; // #20 in https://oeis.org/A006884
LL | | while n != 0 {
... |
LL | | n
LL | | }];
| |_____^
error[E0080]: evaluation of constant value failed
--> $DIR/infinite_loop.rs:10:20
|
LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
| ^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0019, E0080.
For more information about an error, try `rustc --explain E0019`.