summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt')
-rw-r--r--src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt b/src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
new file mode 100644
index 000000000..437d74b5c
--- /dev/null
+++ b/src/doc/book/listings/ch15-smart-pointers/listing-15-03/output.txt
@@ -0,0 +1,27 @@
+$ cargo run
+ Compiling cons-list v0.1.0 (file:///projects/cons-list)
+error[E0072]: recursive type `List` has infinite size
+ --> src/main.rs:1:1
+ |
+1 | enum List {
+ | ^^^^^^^^^ recursive type has infinite size
+2 | Cons(i32, List),
+ | ---- recursive without indirection
+ |
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable
+ |
+2 | Cons(i32, Box<List>),
+ | ++++ +
+
+error[E0391]: cycle detected when computing drop-check constraints for `List`
+ --> src/main.rs:1:1
+ |
+1 | enum List {
+ | ^^^^^^^^^
+ |
+ = note: ...which immediately requires computing drop-check constraints for `List` again
+ = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: List } }`
+
+Some errors have detailed explanations: E0072, E0391.
+For more information about an error, try `rustc --explain E0072`.
+error: could not compile `cons-list` due to 2 previous errors