]> git.lizzy.rs Git - rust.git/commitdiff
Disabled error `E0007` from rustc_error_codes
authorAmjad Alsharafi <amjadsharafi10@gmail.com>
Sun, 30 Aug 2020 23:01:32 +0000 (07:01 +0800)
committerAmjad Alsharafi <amjadsharafi10@gmail.com>
Tue, 15 Sep 2020 06:23:20 +0000 (14:23 +0800)
compiler/rustc_error_codes/src/error_codes/E0007.md

index 2be7870d5aeee8eff87cb77aff14dc42179779c1..2c22b86af9246045d7b7710c8860b46d9af2fdf5 100644 (file)
@@ -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
@@ -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 => {},
 }
 ```