Clean up E0507 explanation
This commit is contained in:
parent
1b521f5773
commit
6569a2ec1b
@ -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:
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user