diff options
Diffstat (limited to 'tests/ui/pattern/pat-tuple-field-count-cross.stderr')
| -rw-r--r-- | tests/ui/pattern/pat-tuple-field-count-cross.stderr | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/tests/ui/pattern/pat-tuple-field-count-cross.stderr b/tests/ui/pattern/pat-tuple-field-count-cross.stderr index 0d7f2e4af69..c084ec0b532 100644 --- a/tests/ui/pattern/pat-tuple-field-count-cross.stderr +++ b/tests/ui/pattern/pat-tuple-field-count-cross.stderr @@ -25,12 +25,14 @@ LL | pub struct Z1(); | help: use this syntax instead | -LL | Z0 => {} - | ~~ +LL - Z0() => {} +LL + Z0 => {} + | help: a tuple struct with a similar name exists | -LL | Z1() => {} - | ~~ +LL - Z0() => {} +LL + Z1() => {} + | error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0` --> $DIR/pat-tuple-field-count-cross.rs:10:9 @@ -47,12 +49,14 @@ LL | pub struct Z1(); | help: use this syntax instead | -LL | Z0 => {} - | ~~ +LL - Z0(x) => {} +LL + Z0 => {} + | help: a tuple struct with a similar name exists | -LL | Z1(x) => {} - | ~~ +LL - Z0(x) => {} +LL + Z1(x) => {} + | error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0` --> $DIR/pat-tuple-field-count-cross.rs:31:9 @@ -69,12 +73,14 @@ LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) } | help: use this syntax instead | -LL | E1::Z0 => {} - | ~~~~~~ +LL - E1::Z0() => {} +LL + E1::Z0 => {} + | help: a tuple variant with a similar name exists | -LL | E1::Z1() => {} - | ~~ +LL - E1::Z0() => {} +LL + E1::Z1() => {} + | error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0` --> $DIR/pat-tuple-field-count-cross.rs:32:9 @@ -91,12 +97,14 @@ LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) } | help: use this syntax instead | -LL | E1::Z0 => {} - | ~~~~~~ +LL - E1::Z0(x) => {} +LL + E1::Z0 => {} + | help: a tuple variant with a similar name exists | -LL | E1::Z1(x) => {} - | ~~ +LL - E1::Z0(x) => {} +LL + E1::Z1(x) => {} + | error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1` --> $DIR/pat-tuple-field-count-cross.rs:35:9 @@ -113,12 +121,14 @@ LL | pub enum E1 { Z0, Z1(), S(u8, u8, u8) } | help: use the tuple variant pattern syntax instead | -LL | E1::Z1() => {} - | ~~~~~~~~ +LL - E1::Z1 => {} +LL + E1::Z1() => {} + | help: a unit variant with a similar name exists | -LL | E1::Z0 => {} - | ~~ +LL - E1::Z1 => {} +LL + E1::Z0 => {} + | error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields --> $DIR/pat-tuple-field-count-cross.rs:14:12 |
