diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-09 22:30:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-10 20:21:39 +0000 |
| commit | f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch) | |
| tree | e97d87013709bda13934fdc452a2a459a069876a /tests/ui/pattern/pat-tuple-field-count-cross.stderr | |
| parent | 8c04e395952022a451138dc4dbead6dd6ae65203 (diff) | |
| download | rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip | |
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
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 |
