]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0507 explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 7 Apr 2020 12:07:57 +0000 (14:07 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 7 Apr 2020 12:08:04 +0000 (14:08 +0200)
src/librustc_error_codes/error_codes/E0507.md

index 1e3457e96c5f87954db3af7b3f543a04d657cd0a..254751fc45e305686c311c6f397229659cc7b573 100644 (file)
@@ -1,9 +1,4 @@
-You tried to move out of a value which was borrowed.
-
-This can also happen when using a type implementing `Fn` or `FnMut`, as neither
-allows moving out of them (they usually represent closures which can be called
-more than once). Much of the text following applies equally well to non-`FnOnce`
-closure bodies.
+A borrowed value was moved out.
 
 Erroneous code example:
 
@@ -32,6 +27,11 @@ you have three choices:
 * Somehow reclaim the ownership.
 * Implement the `Copy` trait on the type.
 
+This can also happen when using a type implementing `Fn` or `FnMut`, as neither
+allows moving out of them (they usually represent closures which can be called
+more than once). Much of the text following applies equally well to non-`FnOnce`
+closure bodies.
+
 Examples:
 
 ```