]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/defaults-cyclic-fail.stderr
Auto merge of #95295 - CAD97:layout-isize, r=scottmcm
[rust.git] / src / test / ui / associated-consts / defaults-cyclic-fail.stderr
1 error[E0391]: cycle detected when const-evaluating + checking `Tr::A`
2   --> $DIR/defaults-cyclic-fail.rs:5:5
3    |
4 LL |     const A: u8 = Self::B;
5    |     ^^^^^^^^^^^
6    |
7 note: ...which requires const-evaluating + checking `Tr::B`...
8   --> $DIR/defaults-cyclic-fail.rs:8:5
9    |
10 LL |     const B: u8 = Self::A;
11    |     ^^^^^^^^^^^
12    = note: ...which again requires const-evaluating + checking `Tr::A`, completing the cycle
13 note: cycle used when const-evaluating + checking `main::promoted[1]`
14   --> $DIR/defaults-cyclic-fail.rs:16:16
15    |
16 LL |     assert_eq!(<() as Tr>::A, 0);
17    |                ^^^^^^^^^^^^^
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0391`.