diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-04-07 14:07:57 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-04-07 14:08:04 +0200 |
| commit | 6569a2ec1bef59bd409b13967278c95afb4bec28 (patch) | |
| tree | 1ede5fab7bba442b953560e17953ad159b7bf73b /src/librustc_error_codes/error_codes | |
| parent | 1b521f57735663de9373679cf8c6502622036bf1 (diff) | |
| download | rust-6569a2ec1bef59bd409b13967278c95afb4bec28.tar.gz rust-6569a2ec1bef59bd409b13967278c95afb4bec28.zip | |
Clean up E0507 explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0507.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0507.md b/src/librustc_error_codes/error_codes/E0507.md index 1e3457e96c5..254751fc45e 100644 --- a/src/librustc_error_codes/error_codes/E0507.md +++ b/src/librustc_error_codes/error_codes/E0507.md @@ -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: ``` |
