2018-06-24 15:53:27 -05:00
|
|
|
error[E0019]: constant contains unimplemented expression type
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/infinite_loop.rs:9:9
|
2018-06-24 15:53:27 -05:00
|
|
|
|
|
|
|
|
LL | / while n != 0 { //~ ERROR constant contains unimplemented expression type
|
|
|
|
LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | | //~^ ERROR evaluation of constant value failed
|
2018-06-24 15:53:27 -05:00
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
warning: Constant evaluating a complex constant, this might take some time
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/infinite_loop.rs:6:18
|
2018-06-24 15:53:27 -05:00
|
|
|
|
|
|
|
|
LL | let _ = [(); {
|
|
|
|
| __________________^
|
|
|
|
LL | | //~^ WARNING Constant evaluating a complex constant, this might take some time
|
2018-06-29 15:32:54 -05:00
|
|
|
LL | | let mut n = 113383; // #20 in https://oeis.org/A006884
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | | while n != 0 { //~ ERROR constant contains unimplemented expression type
|
2018-06-24 15:53:27 -05:00
|
|
|
... |
|
|
|
|
LL | | n
|
|
|
|
LL | | }];
|
|
|
|
| |_____^
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/infinite_loop.rs:10:20
|
2018-06-24 15:53:27 -05:00
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
|
|
|
|
| ^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate
|
2018-06-24 15:53:27 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0019, E0080.
|
|
|
|
For more information about an error, try `rustc --explain E0019`.
|