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+
13This error indicates that the bindings in a match arm would require a value to
24be moved into more than one location, thus violating unique ownership. Code
35like 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
79Erroneous code example:
810
9- ``` compile_fail,E0007
11+ ``` compile_fail,E0382
12+ #![feature(bindings_after_at)]
13+
1014let x = Some("s".to_string());
1115
1216match 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```
You can’t perform that action at this time.
0 commit comments