Skip to content

Commit

Permalink
Disabled error E0007 from rustc_error_codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amjad50 committed Sep 15, 2020
1 parent da700cb commit afb9eeb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0007.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#### Note: this error code is no longer emitted by the compiler.

This error indicates that the bindings in a match arm would require a value to
be moved into more than one location, thus violating unique ownership. Code
like the following is invalid as it requires the entire `Option<String>` to be
Expand All @@ -6,11 +8,13 @@ inner `String` to be moved into a variable called `s`.

Erroneous code example:

```compile_fail,E0007
```compile_fail,E0382
#![feature(bindings_after_at)]
let x = Some("s".to_string());
match x {
op_string @ Some(s) => {}, // error: cannot bind by-move with sub-bindings
op_string @ Some(s) => {}, // error: use of moved value
None => {},
}
```
Expand Down

0 comments on commit afb9eeb

Please sign in to comment.