]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/rfc-2005-default-binding-mode/enum.rs
Stabilize match_default_bindings
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / enum.rs
index 58902bf06b314a1c449c417324947a64354b3059..a108653f85d20393deb1574d08f2e8cdcf4a3991 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(match_default_bindings)]
-
 enum Wrapper {
     Wrap(i32),
 }
@@ -18,17 +16,17 @@ enum Wrapper {
 
 pub fn main() {
     let Wrap(x) = &Wrap(3);
-    *x += 1;
+    *x += 1; //~ ERROR cannot assign to immutable
 
 
     if let Some(x) = &Some(3) {
-        *x += 1;
+        *x += 1; //~ ERROR cannot assign to immutable
     } else {
         panic!();
     }
 
     while let Some(x) = &Some(3) {
-        *x += 1;
+        *x += 1; //~ ERROR cannot assign to immutable
         break;
     }
 }