1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::S`
--> $DIR/pat-tuple-underfield.rs:56: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:9:11
|
LL | struct S(i32, f32);
| --- --- tuple struct has 2 fields
...
LL | S(x) => {}
| ^ expected 2 fields, found 1
|
help: use `_` to explicitly ignore each field
|
LL | S(x, _) => {}
| +++
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
--> $DIR/pat-tuple-underfield.rs:14:11
|
LL | struct S(i32, f32);
| --- --- tuple struct has 2 fields
...
LL | S(_) => {}
| ^ expected 2 fields, found 1
|
help: use `_` to explicitly ignore each field
|
LL | S(_, _) => {}
| +++
help: use `..` to ignore all fields
|
LL | S(..) => {}
| ~~
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
--> $DIR/pat-tuple-underfield.rs:20:9
|
LL | struct S(i32, f32);
| --- --- tuple struct has 2 fields
...
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 0 fields, but the corresponding tuple struct has 2 fields
--> $DIR/pat-tuple-underfield.rs:26:9
|
LL | struct S(i32, f32);
| --- --- tuple struct has 2 fields
...
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:33:14
|
LL | S(i32, f32),
| --- --- tuple variant has 2 fields
...
LL | E::S(x) => {}
| ^ expected 2 fields, found 1
|
help: use `_` to explicitly ignore each field
|
LL | E::S(x, _) => {}
| +++
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
--> $DIR/pat-tuple-underfield.rs:38:14
|
LL | S(i32, f32),
| --- --- tuple variant has 2 fields
...
LL | E::S(_) => {}
| ^ expected 2 fields, found 1
|
help: use `_` to explicitly ignore each field
|
LL | E::S(_, _) => {}
| +++
help: use `..` to ignore all fields
|
LL | E::S(..) => {}
| ~~
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
--> $DIR/pat-tuple-underfield.rs:44:9
|
LL | S(i32, f32),
| --- --- tuple variant has 2 fields
...
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[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
--> $DIR/pat-tuple-underfield.rs:50:9
|
LL | S(i32, f32),
| --- --- tuple variant has 2 fields
...
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[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 4 fields
--> $DIR/pat-tuple-underfield.rs:62:19
|
LL | struct Point4(i32, i32, i32, i32);
| --- --- --- --- tuple struct has 4 fields
...
LL | Point4( a , _ ) => {}
| ^ ^ expected 4 fields, found 2
|
help: use `_` to explicitly ignore each field
|
LL | Point4( a , _ , _, _) => {}
| ++++++
help: use `..` to ignore the rest of the fields
|
LL | Point4( a, ..) => {}
| ~~~~
error: aborting due to 10 previous errors
Some errors have detailed explanations: E0023, E0532.
For more information about an error, try `rustc --explain E0023`.
|