about summary refs log tree commit diff
path: root/src/test/ui/missing
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-14 17:11:02 +0000
committerbors <bors@rust-lang.org>2020-07-14 17:11:02 +0000
commit2002ebacfbca288830a3c308ddc8189705c608fe (patch)
treed02268730c1ae866eb4a1ec31e144592b868be3d /src/test/ui/missing
parentc724b67e1b474262917a5154d74e7072267593fe (diff)
parent5414eae4521d0b6141b9db4c44be144757e5d5fb (diff)
downloadrust-2002ebacfbca288830a3c308ddc8189705c608fe.tar.gz
rust-2002ebacfbca288830a3c308ddc8189705c608fe.zip
Auto merge of #74330 - Manishearth:rollup-mrc09pb, r=Manishearth
Rollup of 15 pull requests

Successful merges:

 - #71237 (Add Ayu theme to rustdoc)
 - #73720 (Clean up E0704 error explanation)
 - #73866 (Obviate #[allow(improper_ctypes_definitions)])
 - #73965 (typeck: check for infer before type impls trait)
 - #73986 (add (unchecked) indexing methods to raw (and NonNull) slices)
 - #74173 (Detect tuple struct incorrectly used as struct pat)
 - #74220 (Refactor Windows `parse_prefix`)
 - #74227 (Remove an unwrap in layout computation)
 - #74239 (Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit )
 - #74257 (don't mark linux kernel module targets as a unix environment)
 - #74270 (typeck: report placeholder type error w/out span)
 - #74296 (Clarify the description for rfind)
 - #74310 (Use `ArrayVec` in `SparseBitSet`.)
 - #74316 (Remove unnecessary type hints from Wake internals)
 - #74324 (Update Clippy)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/ui/missing')
-rw-r--r--src/test/ui/missing/missing-fields-in-struct-pattern.rs3
-rw-r--r--src/test/ui/missing/missing-fields-in-struct-pattern.stderr17
2 files changed, 5 insertions, 15 deletions
diff --git a/src/test/ui/missing/missing-fields-in-struct-pattern.rs b/src/test/ui/missing/missing-fields-in-struct-pattern.rs
index 24b6b55db66..40304a674a6 100644
--- a/src/test/ui/missing/missing-fields-in-struct-pattern.rs
+++ b/src/test/ui/missing/missing-fields-in-struct-pattern.rs
@@ -2,8 +2,7 @@ struct S(usize, usize, usize, usize);
 
 fn main() {
     if let S { a, b, c, d } = S(1, 2, 3, 4) {
-    //~^ ERROR struct `S` does not have fields named `a`, `b`, `c`, `d` [E0026]
-    //~| ERROR pattern does not mention fields `0`, `1`, `2`, `3` [E0027]
+    //~^ ERROR tuple variant `S` written as struct variant
         println!("hi");
     }
 }
diff --git a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr
index f7037468996..6583524aad1 100644
--- a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr
+++ b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr
@@ -1,18 +1,9 @@
-error[E0026]: struct `S` does not have fields named `a`, `b`, `c`, `d`
-  --> $DIR/missing-fields-in-struct-pattern.rs:4:16
-   |
-LL |     if let S { a, b, c, d } = S(1, 2, 3, 4) {
-   |                ^  ^  ^  ^ struct `S` does not have these fields
-
-error[E0027]: pattern does not mention fields `0`, `1`, `2`, `3`
+error[E0769]: tuple variant `S` written as struct variant
   --> $DIR/missing-fields-in-struct-pattern.rs:4:12
    |
 LL |     if let S { a, b, c, d } = S(1, 2, 3, 4) {
-   |            ^^^^^^^^^^^^^^^^ missing fields `0`, `1`, `2`, `3`
-   |
-   = note: trying to match a tuple variant with a struct variant pattern
+   |            ^^^^^^^^^^^^^^^^ help: use the tuple variant pattern syntax instead: `S(a, b, c, d)`
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0026, E0027.
-For more information about an error, try `rustc --explain E0026`.
+For more information about this error, try `rustc --explain E0769`.