]> git.proxmox.com Git - rustc.git/blame - src/test/ui/or-patterns/or-patterns-binding-type-mismatch.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / or-patterns / or-patterns-binding-type-mismatch.stderr
CommitLineData
74b04a01
XL
1error[E0308]: mismatched types
2 --> $DIR/or-patterns-binding-type-mismatch.rs:13:39
3 |
4LL | match Blah::A(1, 1, 2) {
1b1a35ee 5 | ---------------- this expression has type `Blah`
74b04a01
XL
6LL | Blah::A(_, x, y) | Blah::B(x, y) => {}
7 | - ^ expected `usize`, found `isize`
8 | |
9 | first introduced with type `usize` here
10 |
11 = note: in the same arm, a binding must have the same type in all alternatives
12
13error[E0308]: mismatched types
14 --> $DIR/or-patterns-binding-type-mismatch.rs:17:44
15 |
16LL | match Some(Blah::A(1, 1, 2)) {
1b1a35ee 17 | ---------------------- this expression has type `Option<Blah>`
74b04a01
XL
18LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {}
19 | - ^ expected `usize`, found `isize`
20 | |
21 | first introduced with type `usize` here
22 |
23 = note: in the same arm, a binding must have the same type in all alternatives
24
25error[E0308]: mismatched types
26 --> $DIR/or-patterns-binding-type-mismatch.rs:21:19
27 |
28LL | match (0u8, 1u16) {
29 | ----------- this expression has type `(u8, u16)`
30LL | (x, y) | (y, x) => {}
31 | - ^ expected `u16`, found `u8`
32 | |
33 | first introduced with type `u16` here
34 |
35 = note: in the same arm, a binding must have the same type in all alternatives
36
37error[E0308]: mismatched types
38 --> $DIR/or-patterns-binding-type-mismatch.rs:21:22
39 |
40LL | match (0u8, 1u16) {
41 | ----------- this expression has type `(u8, u16)`
42LL | (x, y) | (y, x) => {}
43 | - ^ expected `u8`, found `u16`
44 | |
45 | first introduced with type `u8` here
46 |
47 = note: in the same arm, a binding must have the same type in all alternatives
48
49error[E0308]: mismatched types
50 --> $DIR/or-patterns-binding-type-mismatch.rs:26:41
51 |
52LL | match Some((0u8, Some((1u16, 2u32)))) {
1b1a35ee 53 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
54LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
55 | - ^ expected `u16`, found `u8`
56 | |
57 | first introduced with type `u16` here
58 |
59 = note: in the same arm, a binding must have the same type in all alternatives
60
61error[E0308]: mismatched types
62 --> $DIR/or-patterns-binding-type-mismatch.rs:26:50
63 |
64LL | match Some((0u8, Some((1u16, 2u32)))) {
1b1a35ee 65 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
66LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
67 | - ^ expected `u8`, found `u16`
68 | |
69 | first introduced with type `u8` here
70 |
71 = note: in the same arm, a binding must have the same type in all alternatives
72
73error[E0308]: mismatched types
74 --> $DIR/or-patterns-binding-type-mismatch.rs:26:59
75 |
76LL | match Some((0u8, Some((1u16, 2u32)))) {
1b1a35ee 77 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
78LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
79 | - ^ expected `u32`, found `u16`
80 | |
81 | first introduced with type `u32` here
82 |
83 = note: in the same arm, a binding must have the same type in all alternatives
84
85error[E0308]: mismatched types
86 --> $DIR/or-patterns-binding-type-mismatch.rs:26:62
87 |
88LL | match Some((0u8, Some((1u16, 2u32)))) {
1b1a35ee 89 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
90LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
91 | - first introduced with type `u8` here ^ expected `u8`, found `u32`
92 |
93 = note: in the same arm, a binding must have the same type in all alternatives
94
95error[E0308]: mismatched types
96 --> $DIR/or-patterns-binding-type-mismatch.rs:34:42
97 |
98LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) {
1b1a35ee 99 | - ^ ---------------- this expression has type `Blah`
74b04a01
XL
100 | | |
101 | | expected `usize`, found `isize`
102 | first introduced with type `usize` here
103 |
104 = note: a binding must have the same type in all alternatives
105
106error[E0308]: mismatched types
107 --> $DIR/or-patterns-binding-type-mismatch.rs:38:47
108 |
109LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) {
1b1a35ee 110 | - ^ ---------------------- this expression has type `Option<Blah>`
74b04a01
XL
111 | | |
112 | | expected `usize`, found `isize`
113 | first introduced with type `usize` here
114 |
115 = note: a binding must have the same type in all alternatives
116
117error[E0308]: mismatched types
118 --> $DIR/or-patterns-binding-type-mismatch.rs:42:22
119 |
120LL | if let (x, y) | (y, x) = (0u8, 1u16) {
121 | - ^ ----------- this expression has type `(u8, u16)`
122 | | |
123 | | expected `u16`, found `u8`
124 | first introduced with type `u16` here
125 |
126 = note: a binding must have the same type in all alternatives
127
128error[E0308]: mismatched types
129 --> $DIR/or-patterns-binding-type-mismatch.rs:42:25
130 |
131LL | if let (x, y) | (y, x) = (0u8, 1u16) {
132 | - ^ ----------- this expression has type `(u8, u16)`
133 | | |
134 | | expected `u8`, found `u16`
135 | first introduced with type `u8` here
136 |
137 = note: a binding must have the same type in all alternatives
138
139error[E0308]: mismatched types
140 --> $DIR/or-patterns-binding-type-mismatch.rs:47:44
141 |
142LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
143 | - ^ expected `u16`, found `u8`
144 | |
145 | first introduced with type `u16` here
146...
147LL | = Some((0u8, Some((1u16, 2u32))))
1b1a35ee 148 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
149 |
150 = note: a binding must have the same type in all alternatives
151
152error[E0308]: mismatched types
153 --> $DIR/or-patterns-binding-type-mismatch.rs:47:53
154 |
155LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
156 | - ^ expected `u8`, found `u16`
157 | |
158 | first introduced with type `u8` here
159...
160LL | = Some((0u8, Some((1u16, 2u32))))
1b1a35ee 161 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
162 |
163 = note: a binding must have the same type in all alternatives
164
165error[E0308]: mismatched types
166 --> $DIR/or-patterns-binding-type-mismatch.rs:47:62
167 |
168LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
169 | - ^ expected `u32`, found `u16`
170 | |
171 | first introduced with type `u32` here
172...
173LL | = Some((0u8, Some((1u16, 2u32))))
1b1a35ee 174 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
175 |
176 = note: a binding must have the same type in all alternatives
177
178error[E0308]: mismatched types
179 --> $DIR/or-patterns-binding-type-mismatch.rs:47:65
180 |
181LL | 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`
183...
184LL | = Some((0u8, Some((1u16, 2u32))))
1b1a35ee 185 | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>`
74b04a01
XL
186 |
187 = note: a binding must have the same type in all alternatives
188
189error[E0308]: mismatched types
6a06907d 190 --> $DIR/or-patterns-binding-type-mismatch.rs:55:40
74b04a01 191 |
6a06907d
XL
192LL | let (Blah::A(_, x, y) | Blah::B(x, y)) = Blah::A(1, 1, 2);
193 | - ^ ---------------- this expression has type `Blah`
194 | | |
195 | | expected `usize`, found `isize`
196 | first introduced with type `usize` here
74b04a01
XL
197 |
198 = note: a binding must have the same type in all alternatives
199
200error[E0308]: mismatched types
6a06907d 201 --> $DIR/or-patterns-binding-type-mismatch.rs:58:20
74b04a01 202 |
6a06907d
XL
203LL | let ((x, y) | (y, x)) = (0u8, 1u16);
204 | - ^ ----------- this expression has type `(u8, u16)`
205 | | |
206 | | expected `u16`, found `u8`
207 | first introduced with type `u16` here
74b04a01
XL
208 |
209 = note: a binding must have the same type in all alternatives
210
211error[E0308]: mismatched types
6a06907d 212 --> $DIR/or-patterns-binding-type-mismatch.rs:58:23
74b04a01 213 |
6a06907d
XL
214LL | let ((x, y) | (y, x)) = (0u8, 1u16);
215 | - ^ ----------- this expression has type `(u8, u16)`
216 | | |
217 | | expected `u8`, found `u16`
218 | first introduced with type `u8` here
74b04a01
XL
219 |
220 = note: a binding must have the same type in all alternatives
221
222error[E0308]: mismatched types
223 --> $DIR/or-patterns-binding-type-mismatch.rs:62:42
224 |
225LL | fn f1((Blah::A(_, x, y) | Blah::B(x, y)): Blah) {}
226 | - ^ ---- expected due to this
227 | | |
228 | | expected `usize`, found `isize`
229 | first introduced with type `usize` here
230 |
231 = note: a binding must have the same type in all alternatives
232
233error[E0308]: mismatched types
234 --> $DIR/or-patterns-binding-type-mismatch.rs:65:22
235 |
236LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
237 | - ^ --------- expected due to this
238 | | |
239 | | expected `u16`, found `u8`
240 | first introduced with type `u16` here
241 |
242 = note: a binding must have the same type in all alternatives
243
244error[E0308]: mismatched types
245 --> $DIR/or-patterns-binding-type-mismatch.rs:65:25
246 |
247LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
248 | - ^ --------- expected due to this
249 | | |
250 | | expected `u8`, found `u16`
251 | first introduced with type `u8` here
252 |
253 = note: a binding must have the same type in all alternatives
254
255error: aborting due to 22 previous errors
256
257For more information about this error, try `rustc --explain E0308`.