summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt')
-rw-r--r--src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt b/src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt
new file mode 100644
index 000000000..7a39ac618
--- /dev/null
+++ b/src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt
@@ -0,0 +1,18 @@
+$ cargo run
+ Compiling rectangles v0.1.0 (file:///projects/rectangles)
+error[E0507]: cannot move out of `value`, a captured variable in an `FnMut` closure
+ --> src/main.rs:18:30
+ |
+15 | let value = String::from("by key called");
+ | ----- captured outer variable
+16 |
+17 | list.sort_by_key(|r| {
+ | ______________________-
+18 | | sort_operations.push(value);
+ | | ^^^^^ move occurs because `value` has type `String`, which does not implement the `Copy` trait
+19 | | r.width
+20 | | });
+ | |_____- captured by this `FnMut` closure
+
+For more information about this error, try `rustc --explain E0507`.
+error: could not compile `rectangles` due to previous error