]>
Commit | Line | Data |
---|---|---|
0731742a XL |
1 | error[E0072]: recursive type `MList` has infinite size |
2 | --> $DIR/infinite-tag-type-recursion.rs:1:1 | |
b7449926 | 3 | | |
0731742a | 4 | LL | enum MList { Cons(isize, MList), Nil } |
b7449926 XL |
5 | | ^^^^^^^^^^ ----- recursive without indirection |
6 | | | | |
7 | | recursive type has infinite size | |
8 | | | |
f035d41b XL |
9 | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `MList` representable |
10 | | | |
11 | LL | enum MList { Cons(isize, Box<MList>), Nil } | |
94222f64 | 12 | | ++++ + |
b7449926 | 13 | |
f9f354fc | 14 | error[E0391]: cycle detected when computing drop-check constraints for `MList` |
48663c56 XL |
15 | --> $DIR/infinite-tag-type-recursion.rs:1:1 |
16 | | | |
17 | LL | enum MList { Cons(isize, MList), Nil } | |
18 | | ^^^^^^^^^^ | |
19 | | | |
94222f64 | 20 | = note: ...which immediately requires computing drop-check constraints for `MList` again |
1b1a35ee | 21 | = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: MList } }` |
48663c56 XL |
22 | |
23 | error: aborting due to 2 previous errors | |
b7449926 | 24 | |
48663c56 XL |
25 | Some errors have detailed explanations: E0072, E0391. |
26 | For more information about an error, try `rustc --explain E0072`. |