]> git.lizzy.rs Git - rust.git/blob - src/test/ui/infinite/infinite-type-alias-mutual-recursion.stderr
Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko
[rust.git] / src / test / ui / infinite / infinite-type-alias-mutual-recursion.stderr
1 error[E0391]: cycle detected when expanding type alias `X1`
2   --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11
3    |
4 LL | type X1 = X2;
5    |           ^^
6    |
7 note: ...which requires expanding type alias `X2`...
8   --> $DIR/infinite-type-alias-mutual-recursion.rs:3:11
9    |
10 LL | type X2 = X3;
11    |           ^^
12 note: ...which requires expanding type alias `X3`...
13   --> $DIR/infinite-type-alias-mutual-recursion.rs:4:11
14    |
15 LL | type X3 = X1;
16    |           ^^
17    = note: ...which again requires expanding type alias `X1`, completing the cycle
18    = note: type aliases cannot be recursive
19    = help: consider using a struct, enum, or union instead to break the cycle
20    = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
21 note: cycle used when collecting item types in top-level module
22   --> $DIR/infinite-type-alias-mutual-recursion.rs:1:1
23    |
24 LL | / type X1 = X2;
25 LL | |
26 LL | | type X2 = X3;
27 LL | | type X3 = X1;
28 LL | |
29 LL | | fn main() {}
30    | |____________^
31
32 error: aborting due to previous error
33
34 For more information about this error, try `rustc --explain E0391`.