fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.1 KiB40 linesraw
1error[E0019]: constant contains unimplemented expression type
2  --> $DIR/infinite_loop.rs:7:15
3   |
4LL |         while n != 0 {
5   |               ^^^^^^
6
7error[E0019]: constant contains unimplemented expression type
8  --> $DIR/infinite_loop.rs:7:9
9   |
10LL | /         while n != 0 {
11LL | |
12LL | |
13LL | |             n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
14LL | |
15LL | |         }
16   | |_________^
17
18warning: Constant evaluating a complex constant, this might take some time
19  --> $DIR/infinite_loop.rs:4:18
20   |
21LL |       let _ = [(); {
22   |  __________________^
23LL | |
24LL | |         let mut n = 113383; // #20 in https://oeis.org/A006884
25LL | |         while n != 0 {
26...  |
27LL | |         n
28LL | |     }];
29   | |_____^
30
31error[E0080]: evaluation of constant value failed
32  --> $DIR/infinite_loop.rs:10:20
33   |
34LL |             n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
35   |                    ^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate
36
37error: aborting due to 3 previous errors
38
39Some errors have detailed explanations: E0019, E0080.
40For more information about an error, try `rustc --explain E0019`.