]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/book/listings/ch13-functional-features/listing-13-08/output.txt
New upstream version 1.67.1+dfsg1
[rustc.git] / src / doc / book / listings / ch13-functional-features / listing-13-08 / output.txt
index 7a39ac61844493092eb2873d4e559d4d99d7885b..a91053766777706528090451ea597595f8cd8ecb 100644 (file)
@@ -3,16 +3,13 @@ $ cargo run
 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
+15 |     let value = String::from("by key called");
+   |         ----- captured outer variable
+16 |
+17 |     list.sort_by_key(|r| {
+   |                      --- captured by this `FnMut` closure
+18 |         sort_operations.push(value);
+   |                              ^^^^^ move occurs because `value` has type `String`, which does not implement the `Copy` trait
 
 For more information about this error, try `rustc --explain E0507`.
 error: could not compile `rectangles` due to previous error