]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/by-move-pattern-binding.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / by-move-pattern-binding.rs
index 455b206e53f1a68f3933042e7708b43c3553b4ab..d4c9f23164f8bcb1d55ec5e0fd19c8b2af78a703 100644 (file)
@@ -11,9 +11,9 @@ fn f(x: String) {}
 
 fn main() {
     let s = S { x: E::Bar("hello".to_string()) };
-    match &s.x {
+    match &s.x { //~ ERROR cannot move
         &E::Foo => {}
-        &E::Bar(identifier) => f(identifier.clone())  //~ ERROR cannot move
+        &E::Bar(identifier) => f(identifier.clone())
     };
     match &s.x {
         &E::Foo => {}