1 error[E0308]: mismatched types
2 --> $DIR/or-patterns-binding-type-mismatch.rs:13:39
4 LL | match Blah::A(1, 1, 2) {
5 | ---------------- this expression has type `Blah`
6 LL | Blah::A(_, x, y) | Blah::B(x, y) => {}
7 | - ^ expected `usize`, found `isize`
9 | first introduced with type `usize` here
11 = note: in the same arm, a binding must have the same type in all alternatives
13 error[E0308]: mismatched types
14 --> $DIR/or-patterns-binding-type-mismatch.rs:17:44
16 LL | match Some(Blah::A(1, 1, 2)) {
17 | ---------------------- this expression has type `Option<Blah>`
18 LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {}
19 | - ^ expected `usize`, found `isize`
21 | first introduced with type `usize` here
23 = note: in the same arm, a binding must have the same type in all alternatives
25 error[E0308]: mismatched types
26 --> $DIR/or-patterns-binding-type-mismatch.rs:21:19
28 LL | match (0u8, 1u16) {
29 | ----------- this expression has type `(u8, u16)`
30 LL | (x, y) | (y, x) => {}
31 | - ^ expected `u16`, found `u8`
33 | first introduced with type `u16` here
35 = note: in the same arm, a binding must have the same type in all alternatives
37 error[E0308]: mismatched types
38 --> $DIR/or-patterns-binding-type-mismatch.rs:21:22
40 LL | match (0u8, 1u16) {
41 | ----------- this expression has type `(u8, u16)`
42 LL | (x, y) | (y, x) => {}
43 | - ^ expected `u8`, found `u16`
45 | first introduced with type `u8` here
47 = note: in the same arm, a binding must have the same type in all alternatives
49 error[E0308]: mismatched types
50 --> $DIR/or-patterns-binding-type-mismatch.rs:26:41
52 LL | match Some((0u8, Some((1u16, 2u32)))) {
53 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
54 LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
55 | - ^ expected `u16`, found `u8`
57 | first introduced with type `u16` here
59 = note: in the same arm, a binding must have the same type in all alternatives
61 error[E0308]: mismatched types
62 --> $DIR/or-patterns-binding-type-mismatch.rs:26:50
64 LL | match Some((0u8, Some((1u16, 2u32)))) {
65 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
66 LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
67 | - ^ expected `u8`, found `u16`
69 | first introduced with type `u8` here
71 = note: in the same arm, a binding must have the same type in all alternatives
73 error[E0308]: mismatched types
74 --> $DIR/or-patterns-binding-type-mismatch.rs:26:59
76 LL | match Some((0u8, Some((1u16, 2u32)))) {
77 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
78 LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
79 | - ^ expected `u32`, found `u16`
81 | first introduced with type `u32` here
83 = note: in the same arm, a binding must have the same type in all alternatives
85 error[E0308]: mismatched types
86 --> $DIR/or-patterns-binding-type-mismatch.rs:26:62
88 LL | match Some((0u8, Some((1u16, 2u32)))) {
89 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
90 LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
91 | - first introduced with type `u8` here ^ expected `u8`, found `u32`
93 = note: in the same arm, a binding must have the same type in all alternatives
95 error[E0308]: mismatched types
96 --> $DIR/or-patterns-binding-type-mismatch.rs:34:42
98 LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) {
99 | - ^ ---------------- this expression has type `Blah`
101 | | expected `usize`, found `isize`
102 | first introduced with type `usize` here
104 = note: a binding must have the same type in all alternatives
106 error[E0308]: mismatched types
107 --> $DIR/or-patterns-binding-type-mismatch.rs:38:47
109 LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) {
110 | - ^ ---------------------- this expression has type `Option<Blah>`
112 | | expected `usize`, found `isize`
113 | first introduced with type `usize` here
115 = note: a binding must have the same type in all alternatives
117 error[E0308]: mismatched types
118 --> $DIR/or-patterns-binding-type-mismatch.rs:42:22
120 LL | if let (x, y) | (y, x) = (0u8, 1u16) {
121 | - ^ ----------- this expression has type `(u8, u16)`
123 | | expected `u16`, found `u8`
124 | first introduced with type `u16` here
126 = note: a binding must have the same type in all alternatives
128 error[E0308]: mismatched types
129 --> $DIR/or-patterns-binding-type-mismatch.rs:42:25
131 LL | if let (x, y) | (y, x) = (0u8, 1u16) {
132 | - ^ ----------- this expression has type `(u8, u16)`
134 | | expected `u8`, found `u16`
135 | first introduced with type `u8` here
137 = note: a binding must have the same type in all alternatives
139 error[E0308]: mismatched types
140 --> $DIR/or-patterns-binding-type-mismatch.rs:47:44
142 LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
143 | - ^ expected `u16`, found `u8`
145 | first introduced with type `u16` here
147 LL | = Some((0u8, Some((1u16, 2u32))))
148 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
150 = note: a binding must have the same type in all alternatives
152 error[E0308]: mismatched types
153 --> $DIR/or-patterns-binding-type-mismatch.rs:47:53
155 LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
156 | - ^ expected `u8`, found `u16`
158 | first introduced with type `u8` here
160 LL | = Some((0u8, Some((1u16, 2u32))))
161 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
163 = note: a binding must have the same type in all alternatives
165 error[E0308]: mismatched types
166 --> $DIR/or-patterns-binding-type-mismatch.rs:47:62
168 LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
169 | - ^ expected `u32`, found `u16`
171 | first introduced with type `u32` here
173 LL | = Some((0u8, Some((1u16, 2u32))))
174 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
176 = note: a binding must have the same type in all alternatives
178 error[E0308]: mismatched types
179 --> $DIR/or-patterns-binding-type-mismatch.rs:47:65
181 LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
182 | - first introduced with type `u8` here ^ expected `u8`, found `u32`
184 LL | = Some((0u8, Some((1u16, 2u32))))
185 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
187 = note: a binding must have the same type in all alternatives
189 error[E0308]: mismatched types
190 --> $DIR/or-patterns-binding-type-mismatch.rs:55:39
192 LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2);
193 | - ^ ---------------- this expression has type `Blah`
195 | | expected `usize`, found `isize`
196 | first introduced with type `usize` here
198 = note: a binding must have the same type in all alternatives
200 error[E0308]: mismatched types
201 --> $DIR/or-patterns-binding-type-mismatch.rs:58:19
203 LL | let (x, y) | (y, x) = (0u8, 1u16);
204 | - ^ ----------- this expression has type `(u8, u16)`
206 | | expected `u16`, found `u8`
207 | first introduced with type `u16` here
209 = note: a binding must have the same type in all alternatives
211 error[E0308]: mismatched types
212 --> $DIR/or-patterns-binding-type-mismatch.rs:58:22
214 LL | let (x, y) | (y, x) = (0u8, 1u16);
215 | - ^ ----------- this expression has type `(u8, u16)`
217 | | expected `u8`, found `u16`
218 | first introduced with type `u8` here
220 = note: a binding must have the same type in all alternatives
222 error[E0308]: mismatched types
223 --> $DIR/or-patterns-binding-type-mismatch.rs:62:42
225 LL | fn f1((Blah::A(_, x, y) | Blah::B(x, y)): Blah) {}
226 | - ^ ---- expected due to this
228 | | expected `usize`, found `isize`
229 | first introduced with type `usize` here
231 = note: a binding must have the same type in all alternatives
233 error[E0308]: mismatched types
234 --> $DIR/or-patterns-binding-type-mismatch.rs:65:22
236 LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
237 | - ^ --------- expected due to this
239 | | expected `u16`, found `u8`
240 | first introduced with type `u16` here
242 = note: a binding must have the same type in all alternatives
244 error[E0308]: mismatched types
245 --> $DIR/or-patterns-binding-type-mismatch.rs:65:25
247 LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
248 | - ^ --------- expected due to this
250 | | expected `u8`, found `u16`
251 | first introduced with type `u8` here
253 = note: a binding must have the same type in all alternatives
255 error: aborting due to 22 previous errors
257 For more information about this error, try `rustc --explain E0308`.