]> git.lizzy.rs Git - rust.git/commitdiff
Fix test for PR #49268
authorHidehito Yabuuchi <hdht.ybuc@gmail.com>
Fri, 23 Mar 2018 23:10:51 +0000 (08:10 +0900)
committerHidehito Yabuuchi <hdht.ybuc@gmail.com>
Fri, 23 Mar 2018 23:10:51 +0000 (08:10 +0900)
src/test/ui/issue-49257.rs
src/test/ui/issue-49257.stderr

index 61883294594bc3de2e017d760b363ccf7260ced0..a319849223740c47cc6f06982fcdb738e53f1745 100644 (file)
@@ -18,6 +18,5 @@ struct Point { x: u8, y: u8 }
 fn main() {
     let p = Point { x: 0, y: 0 };
     let Point { .., y } = p; //~ ERROR expected `}`, found `,`
-    //~| ERROR pattern does not mention field `x`
-    //~| ERROR pattern does not mention field `y`
+    //~| ERROR pattern does not mention fields `x`, `y`
 }
index ecaf36520aec9e0629fb62f08e6ad231df2aa25c..fec990764bb1427ea4ffd49ff237de8282d4cf96 100644 (file)
@@ -4,18 +4,12 @@ error: expected `}`, found `,`
 LL |     let Point { .., y } = p; //~ ERROR expected `}`, found `,`
    |                   ^ `..` must be in the last position, and cannot have a trailing comma
 
-error[E0027]: pattern does not mention field `x`
+error[E0027]: pattern does not mention fields `x`, `y`
   --> $DIR/issue-49257.rs:20:9
    |
 LL |     let Point { .., y } = p; //~ ERROR expected `}`, found `,`
-   |         ^^^^^^^^^^^^^^^ missing field `x`
+   |         ^^^^^^^^^^^^^^^ missing fields `x`, `y`
 
-error[E0027]: pattern does not mention field `y`
-  --> $DIR/issue-49257.rs:20:9
-   |
-LL |     let Point { .., y } = p; //~ ERROR expected `}`, found `,`
-   |         ^^^^^^^^^^^^^^^ missing field `y`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0027`.