diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-12-18 19:51:39 -0800 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2021-01-12 19:25:50 -0800 |
| commit | f3d9df54ee682d0b76909d27938b30c51ca5ec70 (patch) | |
| tree | 495a604937423119d89d260d64ee29b28b91eae3 /src/test/ui | |
| parent | 5fe61a79cc5d26a0843b7169d1c95fbb3cbda0ba (diff) | |
Suggest `Variant(..)` if all of the mentioned fields are `_`
Diffstat (limited to 'src/test/ui')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr index 623e1d674d7..dd1fbbbd3bb 100644 --- a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr @@ -38,8 +38,8 @@ LL | TupleStruct(_, _) = TupleStruct(1, 2); | ^^^ help: use `..` to ignore all unmentioned fields | -LL | TupleStruct(_, ..) = TupleStruct(1, 2); - | ^^^^ +LL | TupleStruct(..) = TupleStruct(1, 2); + | ^^ error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/tuple_struct_destructure_fail.rs:34:5 @@ -65,8 +65,8 @@ LL | Enum::SingleVariant(_, _) = Enum::SingleVariant(1, 2); | ^^^ help: use `..` to ignore all unmentioned fields | -LL | Enum::SingleVariant(_, ..) = Enum::SingleVariant(1, 2); - | ^^^^ +LL | Enum::SingleVariant(..) = Enum::SingleVariant(1, 2); + | ^^ error[E0070]: invalid left-hand side of assignment --> $DIR/tuple_struct_destructure_fail.rs:40:12 diff --git a/src/test/ui/match/match-pattern-field-mismatch.stderr b/src/test/ui/match/match-pattern-field-mismatch.stderr index 299b2d216db..1ee45ca1b1e 100644 --- a/src/test/ui/match/match-pattern-field-mismatch.stderr +++ b/src/test/ui/match/match-pattern-field-mismatch.stderr @@ -13,8 +13,8 @@ LL | Color::Rgb(_, _, _) => { } | ^^^ help: use `..` to ignore all unmentioned fields | -LL | Color::Rgb(_, _, ..) => { } - | ^^^^ +LL | Color::Rgb(..) => { } + | ^^ error: aborting due to previous error diff --git a/src/test/ui/pattern/pat-tuple-underfield.stderr b/src/test/ui/pattern/pat-tuple-underfield.stderr index 5364053b8e5..b7a54026639 100644 --- a/src/test/ui/pattern/pat-tuple-underfield.stderr +++ b/src/test/ui/pattern/pat-tuple-underfield.stderr @@ -40,8 +40,8 @@ LL | S(_, _) => {} | ^^^ help: use `..` to ignore all unmentioned fields | -LL | S(_, ..) => {} - | ^^^^ +LL | S(..) => {} + | ^^ error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields --> $DIR/pat-tuple-underfield.rs:20:9 @@ -94,8 +94,8 @@ LL | E::S(_, _) => {} | ^^^ help: use `..` to ignore all unmentioned fields | -LL | E::S(_, ..) => {} - | ^^^^ +LL | E::S(..) => {} + | ^^ error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields --> $DIR/pat-tuple-underfield.rs:39:9 |
