98 lines
2.9 KiB
Plaintext
98 lines
2.9 KiB
Plaintext
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::S`
|
|
--> $DIR/pat-tuple-underfield.rs:41:9
|
|
|
|
|
LL | S(i32, f32),
|
|
| ----------- `E::S` defined here
|
|
...
|
|
LL | E::S => {}
|
|
| ^^^^ help: use the tuple variant pattern syntax instead: `E::S(_, _)`
|
|
|
|
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:8:9
|
|
|
|
|
LL | struct S(i32, f32);
|
|
| ------------------- tuple struct defined here
|
|
...
|
|
LL | S(x) => {}
|
|
| ^^^-
|
|
| | |
|
|
| | help: use `_` to explicitly ignore each field
|
|
| expected 2 fields, found 1
|
|
|
|
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:13:9
|
|
|
|
|
LL | struct S(i32, f32);
|
|
| ------------------- tuple struct defined here
|
|
...
|
|
LL | S(_) => {}
|
|
| ^^^-
|
|
| | |
|
|
| | help: use `_` to explicitly ignore each field
|
|
| expected 2 fields, found 1
|
|
|
|
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:18:9
|
|
|
|
|
LL | struct S(i32, f32);
|
|
| ------------------- tuple struct defined here
|
|
...
|
|
LL | S() => {}
|
|
| ^^^ expected 2 fields, found 0
|
|
|
|
|
help: use `_` to explicitly ignore each field
|
|
|
|
|
LL | S(_, _) => {}
|
|
| ^^^^
|
|
help: use `..` to ignore all fields
|
|
|
|
|
LL | S(..) => {}
|
|
| ^^
|
|
|
|
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:25:9
|
|
|
|
|
LL | S(i32, f32),
|
|
| ----------- tuple variant defined here
|
|
...
|
|
LL | E::S(x) => {}
|
|
| ^^^^^^-
|
|
| | |
|
|
| | help: use `_` to explicitly ignore each field
|
|
| expected 2 fields, found 1
|
|
|
|
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:30:9
|
|
|
|
|
LL | S(i32, f32),
|
|
| ----------- tuple variant defined here
|
|
...
|
|
LL | E::S(_) => {}
|
|
| ^^^^^^-
|
|
| | |
|
|
| | help: use `_` to explicitly ignore each field
|
|
| expected 2 fields, found 1
|
|
|
|
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
|
|
--> $DIR/pat-tuple-underfield.rs:35:9
|
|
|
|
|
LL | S(i32, f32),
|
|
| ----------- tuple variant defined here
|
|
...
|
|
LL | E::S() => {}
|
|
| ^^^^^^ expected 2 fields, found 0
|
|
|
|
|
help: use `_` to explicitly ignore each field
|
|
|
|
|
LL | E::S(_, _) => {}
|
|
| ^^^^
|
|
help: use `..` to ignore all fields
|
|
|
|
|
LL | E::S(..) => {}
|
|
| ^^
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
Some errors have detailed explanations: E0023, E0532.
|
|
For more information about an error, try `rustc --explain E0023`.
|