]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-36163.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / issue-36163.stderr
1 error[E0391]: cycle detected when simplifying constant for the type system `Foo::B::{constant#0}`
2   --> $DIR/issue-36163.rs:4:9
3    |
4 LL |     B = A,
5    |         ^
6    |
7 note: ...which requires simplifying constant for the type system `Foo::B::{constant#0}`...
8   --> $DIR/issue-36163.rs:4:9
9    |
10 LL |     B = A,
11    |         ^
12 note: ...which requires const-evaluating + checking `Foo::B::{constant#0}`...
13   --> $DIR/issue-36163.rs:4:9
14    |
15 LL |     B = A,
16    |         ^
17    = note: ...which requires normalizing `A`...
18 note: ...which requires simplifying constant for the type system `A`...
19   --> $DIR/issue-36163.rs:1:1
20    |
21 LL | const A: isize = Foo::B as isize;
22    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 note: ...which requires simplifying constant for the type system `A`...
24   --> $DIR/issue-36163.rs:1:1
25    |
26 LL | const A: isize = Foo::B as isize;
27    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 note: ...which requires const-evaluating + checking `A`...
29   --> $DIR/issue-36163.rs:1:1
30    |
31 LL | const A: isize = Foo::B as isize;
32    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33    = note: ...which requires normalizing `A`...
34    = note: ...which again requires simplifying constant for the type system `Foo::B::{constant#0}`, completing the cycle
35 note: cycle used when collecting item types in top-level module
36   --> $DIR/issue-36163.rs:1:1
37    |
38 LL | / const A: isize = Foo::B as isize;
39 LL | |
40 LL | | enum Foo {
41 LL | |     B = A,
42 LL | | }
43 LL | |
44 LL | | fn main() {}
45    | |____________^
46
47 error: aborting due to previous error
48
49 For more information about this error, try `rustc --explain E0391`.