summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt')
-rw-r--r--src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt b/src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt
new file mode 100644
index 000000000..f4b7582ac
--- /dev/null
+++ b/src/doc/book/listings/ch19-advanced-features/listing-19-05/output.txt
@@ -0,0 +1,17 @@
+$ cargo run
+ Compiling unsafe-example v0.1.0 (file:///projects/unsafe-example)
+error[E0499]: cannot borrow `*values` as mutable more than once at a time
+ --> src/main.rs:6:31
+ |
+1 | fn split_at_mut(values: &mut [i32], mid: usize) -> (&mut [i32], &mut [i32]) {
+ | - let's call the lifetime of this reference `'1`
+...
+6 | (&mut values[..mid], &mut values[mid..])
+ | --------------------------^^^^^^--------
+ | | | |
+ | | | second mutable borrow occurs here
+ | | first mutable borrow occurs here
+ | returning this value requires that `*values` is borrowed for `'1`
+
+For more information about this error, try `rustc --explain E0499`.
+error: could not compile `unsafe-example` due to previous error