]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
New upstream version 1.50.0+dfsg1
[rustc.git] / src / doc / book / listings / ch15-smart-pointers / listing-15-03 / output.txt
1 $ cargo run
2 Compiling cons-list v0.1.0 (file:///projects/cons-list)
3 error[E0072]: recursive type `List` has infinite size
4 --> src/main.rs:1:1
5 |
6 1 | enum List {
7 | ^^^^^^^^^ recursive type has infinite size
8 2 | Cons(i32, List),
9 | ---- recursive without indirection
10 |
11 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable
12 |
13 2 | Cons(i32, Box<List>),
14 | ^^^^ ^
15
16 error[E0391]: cycle detected when computing drop-check constraints for `List`
17 --> src/main.rs:1:1
18 |
19 1 | enum List {
20 | ^^^^^^^^^
21 |
22 = note: ...which again requires computing drop-check constraints for `List`, completing the cycle
23 = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: List } }`
24
25 error: aborting due to 2 previous errors
26
27 Some errors have detailed explanations: E0072, E0391.
28 For more information about an error, try `rustc --explain E0072`.
29 error: could not compile `cons-list`
30
31 To learn more, run the command again with --verbose.