summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt')
-rw-r--r--src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt b/src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt
new file mode 100644
index 000000000..ab512a9e6
--- /dev/null
+++ b/src/doc/book/listings/ch08-common-collections/listing-08-06/output.txt
@@ -0,0 +1,16 @@
+$ cargo run
+ Compiling collections v0.1.0 (file:///projects/collections)
+error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable
+ --> src/main.rs:6:5
+ |
+4 | let first = &v[0];
+ | - immutable borrow occurs here
+5 |
+6 | v.push(6);
+ | ^^^^^^^^^ mutable borrow occurs here
+7 |
+8 | println!("The first element is: {}", first);
+ | ----- immutable borrow later used here
+
+For more information about this error, try `rustc --explain E0502`.
+error: could not compile `collections` due to previous error