]> git.proxmox.com Git - rustc.git/blame - src/test/ui/infinite/infinite-tag-type-recursion.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / infinite / infinite-tag-type-recursion.stderr
CommitLineData
0731742a
XL
1error[E0072]: recursive type `MList` has infinite size
2 --> $DIR/infinite-tag-type-recursion.rs:1:1
b7449926 3 |
0731742a 4LL | enum MList { Cons(isize, MList), Nil }
b7449926
XL
5 | ^^^^^^^^^^ ----- recursive without indirection
6 | |
7 | recursive type has infinite size
8 |
f035d41b
XL
9help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `MList` representable
10 |
11LL | enum MList { Cons(isize, Box<MList>), Nil }
94222f64 12 | ++++ +
b7449926 13
f9f354fc 14error[E0391]: cycle detected when computing drop-check constraints for `MList`
48663c56
XL
15 --> $DIR/infinite-tag-type-recursion.rs:1:1
16 |
17LL | 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
23error: aborting due to 2 previous errors
b7449926 24
48663c56
XL
25Some errors have detailed explanations: E0072, E0391.
26For more information about an error, try `rustc --explain E0072`.