diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-14 07:39:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-14 07:39:02 -0700 |
| commit | b9a0f5803ecd6dfd66dcd921e31d26a57faa8aad (patch) | |
| tree | 40ace3824f6b6c659ab10b38a293b5b7011a2234 /src/test/ui/missing/missing-fields-in-struct-pattern.stderr | |
| parent | 79894dfbacf76ba7e670fc5bff2fa7f2f3c06597 (diff) | |
| parent | 5daedea3dbeb8fb2639d3d142b008135f4fd2b43 (diff) | |
| download | rust-b9a0f5803ecd6dfd66dcd921e31d26a57faa8aad.tar.gz rust-b9a0f5803ecd6dfd66dcd921e31d26a57faa8aad.zip | |
Rollup merge of #74173 - estebank:struct-pat-as-enum, r=petrochenkov
Detect tuple struct incorrectly used as struct pat Subpart of #74005. r? @petrochenkov
Diffstat (limited to 'src/test/ui/missing/missing-fields-in-struct-pattern.stderr')
| -rw-r--r-- | src/test/ui/missing/missing-fields-in-struct-pattern.stderr | 17 |
1 files changed, 4 insertions, 13 deletions
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`. |
