]> git.proxmox.com Git - rustc.git/blame - src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
New upstream version 1.67.1+dfsg1
[rustc.git] / src / doc / book / listings / ch15-smart-pointers / listing-15-03 / output.txt
CommitLineData
74b04a01
XL
1$ cargo run
2 Compiling cons-list v0.1.0 (file:///projects/cons-list)
3error[E0072]: recursive type `List` has infinite size
4 --> src/main.rs:1:1
5 |
61 | enum List {
7 | ^^^^^^^^^ recursive type has infinite size
82 | Cons(i32, List),
9 | ---- recursive without indirection
10 |
fc512014
XL
11help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable
12 |
132 | Cons(i32, Box<List>),
a2a8927a 14 | ++++ +
74b04a01 15
487cf647
FG
16For more information about this error, try `rustc --explain E0072`.
17error: could not compile `cons-list` due to previous error