]> 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 a49256d1bfc033fe8b414a7a8a49a62088a9abd7..d4c9f23164f8bcb1d55ec5e0fd19c8b2af78a703 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 enum E {
     Foo,
     Bar(String)
@@ -21,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 => {}