Skip to content

Commit afb9eeb

Browse files
committed
Disabled error E0007 from rustc_error_codes
1 parent da700cb commit afb9eeb

File tree

1 file changed

+6
-2
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+6
-2
lines changed

compiler/rustc_error_codes/src/error_codes/E0007.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#### Note: this error code is no longer emitted by the compiler.
2+
13
This error indicates that the bindings in a match arm would require a value to
24
be moved into more than one location, thus violating unique ownership. Code
35
like the following is invalid as it requires the entire `Option<String>` to be
@@ -6,11 +8,13 @@ inner `String` to be moved into a variable called `s`.
68

79
Erroneous code example:
810

9-
```compile_fail,E0007
11+
```compile_fail,E0382
12+
#![feature(bindings_after_at)]
13+
1014
let x = Some("s".to_string());
1115
1216
match x {
13-
op_string @ Some(s) => {}, // error: cannot bind by-move with sub-bindings
17+
op_string @ Some(s) => {}, // error: use of moved value
1418
None => {},
1519
}
1620
```

0 commit comments

Comments
 (0)