]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-52475.stderr
Stabilize `let` bindings and destructuring in constants and const fn
[rust.git] / src / test / ui / consts / const-eval / issue-52475.stderr
1 error[E0019]: constant contains unimplemented expression type
2   --> $DIR/issue-52475.rs:6:9
3    |
4 LL | /         while n < 5 { //~ ERROR constant contains unimplemented expression type
5 LL | |             n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
6 LL | |             x = &0; // Materialize a new AllocId
7 LL | |         }
8    | |_________^
9
10 warning: Constant evaluating a complex constant, this might take some time
11   --> $DIR/issue-52475.rs:2:18
12    |
13 LL |       let _ = [(); {
14    |  __________________^
15 LL | |         //~^ WARNING Constant evaluating a complex constant, this might take some time
16 LL | |         let mut x = &0;
17 LL | |         let mut n = 0;
18 ...  |
19 LL | |         0
20 LL | |     }];
21    | |_____^
22
23 error[E0080]: evaluation of constant value failed
24   --> $DIR/issue-52475.rs:7:17
25    |
26 LL |             n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
27    |                 ^^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate
28
29 error: aborting due to 2 previous errors
30
31 Some errors occurred: E0019, E0080.
32 For more information about an error, try `rustc --explain E0019`.