diff options
Diffstat (limited to 'tests/ui/structs/struct-tuple-field-names.stderr')
| -rw-r--r-- | tests/ui/structs/struct-tuple-field-names.stderr | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/ui/structs/struct-tuple-field-names.stderr b/tests/ui/structs/struct-tuple-field-names.stderr index 5f1ab2f9d68..7692010aa54 100644 --- a/tests/ui/structs/struct-tuple-field-names.stderr +++ b/tests/ui/structs/struct-tuple-field-names.stderr @@ -6,8 +6,9 @@ LL | E::S { 0, 1 } => {} | help: use the tuple variant pattern syntax instead | -LL | E::S(_, _) => {} - | ~~~~~~ +LL - E::S { 0, 1 } => {} +LL + E::S(_, _) => {} + | error[E0769]: tuple variant `S` written as struct variant --> $DIR/struct-tuple-field-names.rs:13:9 @@ -17,8 +18,9 @@ LL | S { } => {} | help: use the tuple variant pattern syntax instead | -LL | S(_, _) => {} - | ~~~~~~ +LL - S { } => {} +LL + S(_, _) => {} + | error[E0027]: pattern does not mention field `1` --> $DIR/struct-tuple-field-names.rs:16:12 @@ -28,16 +30,19 @@ LL | if let E::S { 0: a } = x { | help: include the missing field in the pattern | -LL | if let E::S { 0: a, 1: _ } = x { - | ~~~~~~~~ +LL - if let E::S { 0: a } = x { +LL + if let E::S { 0: a, 1: _ } = x { + | help: if you don't care about this missing field, you can explicitly ignore it | -LL | if let E::S { 0: a, 1: _ } = x { - | ~~~~~~~~ +LL - if let E::S { 0: a } = x { +LL + if let E::S { 0: a, 1: _ } = x { + | help: or always ignore missing fields here | -LL | if let E::S { 0: a, .. } = x { - | ~~~~~~ +LL - if let E::S { 0: a } = x { +LL + if let E::S { 0: a, .. } = x { + | error: aborting due to 3 previous errors |
