Skip to content

Commit 7c2cef0

Browse files
authored
Rollup merge of #70883 - GuillaumeGomez:cleanup-e0507, r=Dylan-DPC
Clean up E0507 explanation r? @Dylan-DPC
2 parents 4320487 + 6569a2e commit 7c2cef0

File tree

1 file changed

+6
-6
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+6
-6
lines changed

src/librustc_error_codes/error_codes/E0507.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
You tried to move out of a value which was borrowed.
2-
3-
This can also happen when using a type implementing `Fn` or `FnMut`, as neither
4-
allows moving out of them (they usually represent closures which can be called
5-
more than once). Much of the text following applies equally well to non-`FnOnce`
6-
closure bodies.
1+
A borrowed value was moved out.
72

83
Erroneous code example:
94

@@ -32,6 +27,11 @@ you have three choices:
3227
* Somehow reclaim the ownership.
3328
* Implement the `Copy` trait on the type.
3429

30+
This can also happen when using a type implementing `Fn` or `FnMut`, as neither
31+
allows moving out of them (they usually represent closures which can be called
32+
more than once). Much of the text following applies equally well to non-`FnOnce`
33+
closure bodies.
34+
3535
Examples:
3636

3737
```

0 commit comments

Comments
 (0)