]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/struct-literal-in-match-discriminant.rs
Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyup
[rust.git] / src / test / ui / parser / struct-literal-in-match-discriminant.rs
index 35a11090351461f349a930c310fe78af2209b8a0..ce132df5a888b9fe4fd226232905e951e87f80de 100644 (file)
@@ -3,11 +3,11 @@ struct Foo {
 }
 
 fn main() {
-    match Foo { //~ ERROR expected value, found struct `Foo`
-        x: 3    //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
+    match Foo { //~ ERROR struct literals are not allowed here
+        x: 3
     } {
-        Foo { //~ ERROR mismatched types
-            x: x //~ ERROR cannot find value `x` in this scope
-        } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
+        Foo {
+            x: x
+        } => {}
     }
 }