diff options
| author | tunawasabi <77270077+tunawasabi@users.noreply.github.com> | 2024-08-25 04:24:27 +0900 |
|---|---|---|
| committer | tunawasabi <77270077+tunawasabi@users.noreply.github.com> | 2024-08-28 22:55:57 +0900 |
| commit | 2ddcbca0e626cc3856349deeed17814ba6c272d6 (patch) | |
| tree | 670b3fe9211fc14f6a5d31eb03f1d733e39d593c /tests/ui/parser | |
| parent | a971212545766fdfe0dd68e5d968133f79944a19 (diff) | |
| download | rust-2ddcbca0e626cc3856349deeed17814ba6c272d6.tar.gz rust-2ddcbca0e626cc3856349deeed17814ba6c272d6.zip | |
Suggest the struct variant pattern syntax on usage of unit variant pattern for a struct variant
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/recover/recover-from-bad-variant.stderr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/parser/recover/recover-from-bad-variant.stderr b/tests/ui/parser/recover/recover-from-bad-variant.stderr index 04968bbdf99..0339f869515 100644 --- a/tests/ui/parser/recover/recover-from-bad-variant.stderr +++ b/tests/ui/parser/recover/recover-from-bad-variant.stderr @@ -19,6 +19,11 @@ error[E0164]: expected tuple struct or tuple variant, found struct variant `Enum | LL | Enum::Foo(a, b) => {} | ^^^^^^^^^^^^^^^ not a tuple struct or tuple variant + | +help: the struct variant's fields are being ignored + | +LL | Enum::Foo { a: _, b: _ } => {} + | ~~~~~~~~~~~~~~ error[E0769]: tuple variant `Enum::Bar` written as struct variant --> $DIR/recover-from-bad-variant.rs:12:9 |
