File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/rustc_error_codes/src/error_codes Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ #### Note: this error code is no longer emitted by the compiler.
2
+
1
3
This error indicates that the bindings in a match arm would require a value to
2
4
be moved into more than one location, thus violating unique ownership. Code
3
5
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`.
6
8
7
9
Erroneous code example:
8
10
9
- ``` compile_fail,E0007
11
+ ``` compile_fail,E0382
12
+ #![feature(bindings_after_at)]
13
+
10
14
let x = Some("s".to_string());
11
15
12
16
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
14
18
None => {},
15
19
}
16
20
```
You can’t perform that action at this time.
0 commit comments