We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
E0007
1 parent da700cb commit afb9eebCopy full SHA for afb9eeb
compiler/rustc_error_codes/src/error_codes/E0007.md
@@ -1,3 +1,5 @@
1
+#### Note: this error code is no longer emitted by the compiler.
2
+
3
This error indicates that the bindings in a match arm would require a value to
4
be moved into more than one location, thus violating unique ownership. Code
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:
10
-```compile_fail,E0007
11
+```compile_fail,E0382
12
+#![feature(bindings_after_at)]
13
14
let x = Some("s".to_string());
15
16
match x {
- op_string @ Some(s) => {}, // error: cannot bind by-move with sub-bindings
17
+ op_string @ Some(s) => {}, // error: use of moved value
18
None => {},
19
}
20
```
0 commit comments