11error[E0308]: mismatched types
2- --> $DIR/or-pattern -mismatch.rs:13:39
2+ --> $DIR/or-patterns-binding-type -mismatch.rs:13:39
33 |
44LL | match Blah::A(1, 1, 2) {
55 | ---------------- this expression has type `main::Blah`
66LL | Blah::A(_, x, y) | Blah::B(x, y) => {}
77 | ^ expected `usize`, found `isize`
88
99error[E0308]: mismatched types
10- --> $DIR/or-pattern -mismatch.rs:17:44
10+ --> $DIR/or-patterns-binding-type -mismatch.rs:17:44
1111 |
1212LL | match Some(Blah::A(1, 1, 2)) {
1313 | ---------------------- this expression has type `std::option::Option<main::Blah>`
1414LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {}
1515 | ^ expected `usize`, found `isize`
1616
1717error[E0308]: mismatched types
18- --> $DIR/or-pattern -mismatch.rs:21:19
18+ --> $DIR/or-patterns-binding-type -mismatch.rs:21:19
1919 |
2020LL | match (0u8, 1u16) {
2121 | ----------- this expression has type `(u8, u16)`
2222LL | (x, y) | (y, x) => {}
2323 | ^ expected `u16`, found `u8`
2424
2525error[E0308]: mismatched types
26- --> $DIR/or-pattern -mismatch.rs:21:22
26+ --> $DIR/or-patterns-binding-type -mismatch.rs:21:22
2727 |
2828LL | match (0u8, 1u16) {
2929 | ----------- this expression has type `(u8, u16)`
3030LL | (x, y) | (y, x) => {}
3131 | ^ expected `u8`, found `u16`
3232
3333error[E0308]: mismatched types
34- --> $DIR/or-pattern -mismatch.rs:26:41
34+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:41
3535 |
3636LL | match Some((0u8, Some((1u16, 2u32)))) {
3737 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
3838LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
3939 | ^ expected `u16`, found `u8`
4040
4141error[E0308]: mismatched types
42- --> $DIR/or-pattern -mismatch.rs:26:50
42+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:50
4343 |
4444LL | match Some((0u8, Some((1u16, 2u32)))) {
4545 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
4646LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
4747 | ^ expected `u8`, found `u16`
4848
4949error[E0308]: mismatched types
50- --> $DIR/or-pattern -mismatch.rs:26:59
50+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:59
5151 |
5252LL | match Some((0u8, Some((1u16, 2u32)))) {
5353 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
5454LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
5555 | ^ expected `u32`, found `u16`
5656
5757error[E0308]: mismatched types
58- --> $DIR/or-pattern -mismatch.rs:26:62
58+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:62
5959 |
6060LL | match Some((0u8, Some((1u16, 2u32)))) {
6161 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
6262LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
6363 | ^ expected `u8`, found `u32`
6464
6565error[E0308]: mismatched types
66- --> $DIR/or-pattern -mismatch.rs:34:42
66+ --> $DIR/or-patterns-binding-type -mismatch.rs:34:42
6767 |
6868LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) {
6969 | ^ ---------------- this expression has type `main::Blah`
7070 | |
7171 | expected `usize`, found `isize`
7272
7373error[E0308]: mismatched types
74- --> $DIR/or-pattern -mismatch.rs:38:47
74+ --> $DIR/or-patterns-binding-type -mismatch.rs:38:47
7575 |
7676LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) {
7777 | ^ ---------------------- this expression has type `std::option::Option<main::Blah>`
7878 | |
7979 | expected `usize`, found `isize`
8080
8181error[E0308]: mismatched types
82- --> $DIR/or-pattern -mismatch.rs:42:22
82+ --> $DIR/or-patterns-binding-type -mismatch.rs:42:22
8383 |
8484LL | if let (x, y) | (y, x) = (0u8, 1u16) {
8585 | ^ ----------- this expression has type `(u8, u16)`
8686 | |
8787 | expected `u16`, found `u8`
8888
8989error[E0308]: mismatched types
90- --> $DIR/or-pattern -mismatch.rs:42:25
90+ --> $DIR/or-patterns-binding-type -mismatch.rs:42:25
9191 |
9292LL | if let (x, y) | (y, x) = (0u8, 1u16) {
9393 | ^ ----------- this expression has type `(u8, u16)`
9494 | |
9595 | expected `u8`, found `u16`
9696
9797error[E0308]: mismatched types
98- --> $DIR/or-pattern -mismatch.rs:47:44
98+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:44
9999 |
100100LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
101101 | ^ expected `u16`, found `u8`
@@ -104,7 +104,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
104104 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
105105
106106error[E0308]: mismatched types
107- --> $DIR/or-pattern -mismatch.rs:47:53
107+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:53
108108 |
109109LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
110110 | ^ expected `u8`, found `u16`
@@ -113,7 +113,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
113113 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
114114
115115error[E0308]: mismatched types
116- --> $DIR/or-pattern -mismatch.rs:47:62
116+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:62
117117 |
118118LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
119119 | ^ expected `u32`, found `u16`
@@ -122,7 +122,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
122122 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
123123
124124error[E0308]: mismatched types
125- --> $DIR/or-pattern -mismatch.rs:47:65
125+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:65
126126 |
127127LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
128128 | ^ expected `u8`, found `u32`
@@ -131,47 +131,47 @@ LL | = Some((0u8, Some((1u16, 2u32))))
131131 | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
132132
133133error[E0308]: mismatched types
134- --> $DIR/or-pattern -mismatch.rs:55:39
134+ --> $DIR/or-patterns-binding-type -mismatch.rs:55:39
135135 |
136136LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2);
137137 | ^ ---------------- this expression has type `main::Blah`
138138 | |
139139 | expected `usize`, found `isize`
140140
141141error[E0308]: mismatched types
142- --> $DIR/or-pattern -mismatch.rs:58:19
142+ --> $DIR/or-patterns-binding-type -mismatch.rs:58:19
143143 |
144144LL | let (x, y) | (y, x) = (0u8, 1u16);
145145 | ^ ----------- this expression has type `(u8, u16)`
146146 | |
147147 | expected `u16`, found `u8`
148148
149149error[E0308]: mismatched types
150- --> $DIR/or-pattern -mismatch.rs:58:22
150+ --> $DIR/or-patterns-binding-type -mismatch.rs:58:22
151151 |
152152LL | let (x, y) | (y, x) = (0u8, 1u16);
153153 | ^ ----------- this expression has type `(u8, u16)`
154154 | |
155155 | expected `u8`, found `u16`
156156
157157error[E0308]: mismatched types
158- --> $DIR/or-pattern -mismatch.rs:62:42
158+ --> $DIR/or-patterns-binding-type -mismatch.rs:62:42
159159 |
160160LL | fn f1((Blah::A(_, x, y) | Blah::B(x, y)): Blah) {}
161161 | ^ ---- expected due to this
162162 | |
163163 | expected `usize`, found `isize`
164164
165165error[E0308]: mismatched types
166- --> $DIR/or-pattern -mismatch.rs:65:22
166+ --> $DIR/or-patterns-binding-type -mismatch.rs:65:22
167167 |
168168LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
169169 | ^ --------- expected due to this
170170 | |
171171 | expected `u16`, found `u8`
172172
173173error[E0308]: mismatched types
174- --> $DIR/or-pattern -mismatch.rs:65:25
174+ --> $DIR/or-patterns-binding-type -mismatch.rs:65:25
175175 |
176176LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
177177 | ^ --------- expected due to this
0 commit comments