]> git.lizzy.rs Git - rust.git/blob - src/test/ui/infinite/infinite-vec-type-recursion.stderr
Merge commit '23d11428de3e973b34a5090a78d62887f821c90e' into clippyup
[rust.git] / src / test / ui / infinite / infinite-vec-type-recursion.stderr
1 error[E0391]: cycle detected when expanding type alias `X`
2   --> $DIR/infinite-vec-type-recursion.rs:1:14
3    |
4 LL | type X = Vec<X>;
5    |              ^
6    |
7    = note: ...which immediately requires expanding type alias `X` again
8    = note: type aliases cannot be recursive
9    = help: consider using a struct, enum, or union instead to break the cycle
10    = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
11 note: cycle used when collecting item types in top-level module
12   --> $DIR/infinite-vec-type-recursion.rs:1:1
13    |
14 LL | / type X = Vec<X>;
15 LL | |
16 LL | |
17 LL | | fn main() { let b: X = Vec::new(); }
18    | |____________________________________^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0391`.