1
1
error[E0308]: mismatched types
2
- --> $DIR/or-pattern -mismatch.rs:13:39
2
+ --> $DIR/or-patterns-binding-type -mismatch.rs:13:39
3
3
|
4
4
LL | match Blah::A(1, 1, 2) {
5
5
| ---------------- this expression has type `main::Blah`
6
6
LL | Blah::A(_, x, y) | Blah::B(x, y) => {}
7
7
| ^ expected `usize`, found `isize`
8
8
9
9
error[E0308]: mismatched types
10
- --> $DIR/or-pattern -mismatch.rs:17:44
10
+ --> $DIR/or-patterns-binding-type -mismatch.rs:17:44
11
11
|
12
12
LL | match Some(Blah::A(1, 1, 2)) {
13
13
| ---------------------- this expression has type `std::option::Option<main::Blah>`
14
14
LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {}
15
15
| ^ expected `usize`, found `isize`
16
16
17
17
error[E0308]: mismatched types
18
- --> $DIR/or-pattern -mismatch.rs:21:19
18
+ --> $DIR/or-patterns-binding-type -mismatch.rs:21:19
19
19
|
20
20
LL | match (0u8, 1u16) {
21
21
| ----------- this expression has type `(u8, u16)`
22
22
LL | (x, y) | (y, x) => {}
23
23
| ^ expected `u16`, found `u8`
24
24
25
25
error[E0308]: mismatched types
26
- --> $DIR/or-pattern -mismatch.rs:21:22
26
+ --> $DIR/or-patterns-binding-type -mismatch.rs:21:22
27
27
|
28
28
LL | match (0u8, 1u16) {
29
29
| ----------- this expression has type `(u8, u16)`
30
30
LL | (x, y) | (y, x) => {}
31
31
| ^ expected `u8`, found `u16`
32
32
33
33
error[E0308]: mismatched types
34
- --> $DIR/or-pattern -mismatch.rs:26:41
34
+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:41
35
35
|
36
36
LL | match Some((0u8, Some((1u16, 2u32)))) {
37
37
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
38
38
LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
39
39
| ^ expected `u16`, found `u8`
40
40
41
41
error[E0308]: mismatched types
42
- --> $DIR/or-pattern -mismatch.rs:26:50
42
+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:50
43
43
|
44
44
LL | match Some((0u8, Some((1u16, 2u32)))) {
45
45
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
46
46
LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
47
47
| ^ expected `u8`, found `u16`
48
48
49
49
error[E0308]: mismatched types
50
- --> $DIR/or-pattern -mismatch.rs:26:59
50
+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:59
51
51
|
52
52
LL | match Some((0u8, Some((1u16, 2u32)))) {
53
53
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
54
54
LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
55
55
| ^ expected `u32`, found `u16`
56
56
57
57
error[E0308]: mismatched types
58
- --> $DIR/or-pattern -mismatch.rs:26:62
58
+ --> $DIR/or-patterns-binding-type -mismatch.rs:26:62
59
59
|
60
60
LL | match Some((0u8, Some((1u16, 2u32)))) {
61
61
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
62
62
LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {}
63
63
| ^ expected `u8`, found `u32`
64
64
65
65
error[E0308]: mismatched types
66
- --> $DIR/or-pattern -mismatch.rs:34:42
66
+ --> $DIR/or-patterns-binding-type -mismatch.rs:34:42
67
67
|
68
68
LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) {
69
69
| ^ ---------------- this expression has type `main::Blah`
70
70
| |
71
71
| expected `usize`, found `isize`
72
72
73
73
error[E0308]: mismatched types
74
- --> $DIR/or-pattern -mismatch.rs:38:47
74
+ --> $DIR/or-patterns-binding-type -mismatch.rs:38:47
75
75
|
76
76
LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) {
77
77
| ^ ---------------------- this expression has type `std::option::Option<main::Blah>`
78
78
| |
79
79
| expected `usize`, found `isize`
80
80
81
81
error[E0308]: mismatched types
82
- --> $DIR/or-pattern -mismatch.rs:42:22
82
+ --> $DIR/or-patterns-binding-type -mismatch.rs:42:22
83
83
|
84
84
LL | if let (x, y) | (y, x) = (0u8, 1u16) {
85
85
| ^ ----------- this expression has type `(u8, u16)`
86
86
| |
87
87
| expected `u16`, found `u8`
88
88
89
89
error[E0308]: mismatched types
90
- --> $DIR/or-pattern -mismatch.rs:42:25
90
+ --> $DIR/or-patterns-binding-type -mismatch.rs:42:25
91
91
|
92
92
LL | if let (x, y) | (y, x) = (0u8, 1u16) {
93
93
| ^ ----------- this expression has type `(u8, u16)`
94
94
| |
95
95
| expected `u8`, found `u16`
96
96
97
97
error[E0308]: mismatched types
98
- --> $DIR/or-pattern -mismatch.rs:47:44
98
+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:44
99
99
|
100
100
LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
101
101
| ^ expected `u16`, found `u8`
@@ -104,7 +104,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
104
104
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
105
105
106
106
error[E0308]: mismatched types
107
- --> $DIR/or-pattern -mismatch.rs:47:53
107
+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:53
108
108
|
109
109
LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
110
110
| ^ expected `u8`, found `u16`
@@ -113,7 +113,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
113
113
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
114
114
115
115
error[E0308]: mismatched types
116
- --> $DIR/or-pattern -mismatch.rs:47:62
116
+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:62
117
117
|
118
118
LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
119
119
| ^ expected `u32`, found `u16`
@@ -122,7 +122,7 @@ LL | = Some((0u8, Some((1u16, 2u32))))
122
122
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
123
123
124
124
error[E0308]: mismatched types
125
- --> $DIR/or-pattern -mismatch.rs:47:65
125
+ --> $DIR/or-patterns-binding-type -mismatch.rs:47:65
126
126
|
127
127
LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x))))
128
128
| ^ expected `u8`, found `u32`
@@ -131,47 +131,47 @@ LL | = Some((0u8, Some((1u16, 2u32))))
131
131
| ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>`
132
132
133
133
error[E0308]: mismatched types
134
- --> $DIR/or-pattern -mismatch.rs:55:39
134
+ --> $DIR/or-patterns-binding-type -mismatch.rs:55:39
135
135
|
136
136
LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2);
137
137
| ^ ---------------- this expression has type `main::Blah`
138
138
| |
139
139
| expected `usize`, found `isize`
140
140
141
141
error[E0308]: mismatched types
142
- --> $DIR/or-pattern -mismatch.rs:58:19
142
+ --> $DIR/or-patterns-binding-type -mismatch.rs:58:19
143
143
|
144
144
LL | let (x, y) | (y, x) = (0u8, 1u16);
145
145
| ^ ----------- this expression has type `(u8, u16)`
146
146
| |
147
147
| expected `u16`, found `u8`
148
148
149
149
error[E0308]: mismatched types
150
- --> $DIR/or-pattern -mismatch.rs:58:22
150
+ --> $DIR/or-patterns-binding-type -mismatch.rs:58:22
151
151
|
152
152
LL | let (x, y) | (y, x) = (0u8, 1u16);
153
153
| ^ ----------- this expression has type `(u8, u16)`
154
154
| |
155
155
| expected `u8`, found `u16`
156
156
157
157
error[E0308]: mismatched types
158
- --> $DIR/or-pattern -mismatch.rs:62:42
158
+ --> $DIR/or-patterns-binding-type -mismatch.rs:62:42
159
159
|
160
160
LL | fn f1((Blah::A(_, x, y) | Blah::B(x, y)): Blah) {}
161
161
| ^ ---- expected due to this
162
162
| |
163
163
| expected `usize`, found `isize`
164
164
165
165
error[E0308]: mismatched types
166
- --> $DIR/or-pattern -mismatch.rs:65:22
166
+ --> $DIR/or-patterns-binding-type -mismatch.rs:65:22
167
167
|
168
168
LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
169
169
| ^ --------- expected due to this
170
170
| |
171
171
| expected `u16`, found `u8`
172
172
173
173
error[E0308]: mismatched types
174
- --> $DIR/or-pattern -mismatch.rs:65:25
174
+ --> $DIR/or-patterns-binding-type -mismatch.rs:65:25
175
175
|
176
176
LL | fn f2(((x, y) | (y, x)): (u8, u16)) {}
177
177
| ^ --------- expected due to this
0 commit comments