1
1
error: unnested or-patterns
2
- --> tests/ui/unnested_or_patterns.rs:16 :12
2
+ --> tests/ui/unnested_or_patterns.rs:21 :12
3
3
|
4
4
LL | if let box 0 | box 2 = Box::new(0) {}
5
5
| ^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL + if let box (0 | 2) = Box::new(0) {}
13
13
|
14
14
15
15
error: unnested or-patterns
16
- --> tests/ui/unnested_or_patterns.rs:18 :12
16
+ --> tests/ui/unnested_or_patterns.rs:23 :12
17
17
|
18
18
LL | if let box ((0 | 1)) | box (2 | 3) | box 4 = Box::new(0) {}
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL + if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {}
25
25
|
26
26
27
27
error: unnested or-patterns
28
- --> tests/ui/unnested_or_patterns.rs:21 :12
28
+ --> tests/ui/unnested_or_patterns.rs:26 :12
29
29
|
30
30
LL | if let Some(1) | C0 | Some(2) = None {}
31
31
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL + if let Some(1 | 2) | C0 = None {}
37
37
|
38
38
39
39
error: unnested or-patterns
40
- --> tests/ui/unnested_or_patterns.rs:23 :12
40
+ --> tests/ui/unnested_or_patterns.rs:28 :12
41
41
|
42
42
LL | if let &mut 0 | &mut 2 = &mut 0 {}
43
43
| ^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + if let &mut (0 | 2) = &mut 0 {}
49
49
|
50
50
51
51
error: unnested or-patterns
52
- --> tests/ui/unnested_or_patterns.rs:25 :12
52
+ --> tests/ui/unnested_or_patterns.rs:30 :12
53
53
|
54
54
LL | if let x @ 0 | x @ 2 = 0 {}
55
55
| ^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ LL + if let x @ (0 | 2) = 0 {}
61
61
|
62
62
63
63
error: unnested or-patterns
64
- --> tests/ui/unnested_or_patterns.rs:27 :12
64
+ --> tests/ui/unnested_or_patterns.rs:32 :12
65
65
|
66
66
LL | if let (0, 1) | (0, 2) | (0, 3) = (0, 0) {}
67
67
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,7 +73,7 @@ LL + if let (0, 1 | 2 | 3) = (0, 0) {}
73
73
|
74
74
75
75
error: unnested or-patterns
76
- --> tests/ui/unnested_or_patterns.rs:29 :12
76
+ --> tests/ui/unnested_or_patterns.rs:34 :12
77
77
|
78
78
LL | if let (1, 0) | (2, 0) | (3, 0) = (0, 0) {}
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL + if let (1 | 2 | 3, 0) = (0, 0) {}
85
85
|
86
86
87
87
error: unnested or-patterns
88
- --> tests/ui/unnested_or_patterns.rs:31 :12
88
+ --> tests/ui/unnested_or_patterns.rs:36 :12
89
89
|
90
90
LL | if let (x, ..) | (x, 1) | (x, 2) = (0, 1) {}
91
91
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -97,7 +97,7 @@ LL + if let (x, ..) | (x, 1 | 2) = (0, 1) {}
97
97
|
98
98
99
99
error: unnested or-patterns
100
- --> tests/ui/unnested_or_patterns.rs:33 :12
100
+ --> tests/ui/unnested_or_patterns.rs:38 :12
101
101
|
102
102
LL | if let [0] | [1] = [0] {}
103
103
| ^^^^^^^^^
@@ -109,7 +109,7 @@ LL + if let [0 | 1] = [0] {}
109
109
|
110
110
111
111
error: unnested or-patterns
112
- --> tests/ui/unnested_or_patterns.rs:35 :12
112
+ --> tests/ui/unnested_or_patterns.rs:40 :12
113
113
|
114
114
LL | if let [x, 0] | [x, 1] = [0, 1] {}
115
115
| ^^^^^^^^^^^^^^^
@@ -121,7 +121,7 @@ LL + if let [x, 0 | 1] = [0, 1] {}
121
121
|
122
122
123
123
error: unnested or-patterns
124
- --> tests/ui/unnested_or_patterns.rs:37 :12
124
+ --> tests/ui/unnested_or_patterns.rs:42 :12
125
125
|
126
126
LL | if let [x, 0] | [x, 1] | [x, 2] = [0, 1] {}
127
127
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -133,7 +133,7 @@ LL + if let [x, 0 | 1 | 2] = [0, 1] {}
133
133
|
134
134
135
135
error: unnested or-patterns
136
- --> tests/ui/unnested_or_patterns.rs:39 :12
136
+ --> tests/ui/unnested_or_patterns.rs:44 :12
137
137
|
138
138
LL | if let [x, ..] | [x, 1] | [x, 2] = [0, 1] {}
139
139
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ LL + if let [x, ..] | [x, 1 | 2] = [0, 1] {}
145
145
|
146
146
147
147
error: unnested or-patterns
148
- --> tests/ui/unnested_or_patterns.rs:42 :12
148
+ --> tests/ui/unnested_or_patterns.rs:47 :12
149
149
|
150
150
LL | if let TS(0, x) | TS(1, x) = TS(0, 0) {}
151
151
| ^^^^^^^^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL + if let TS(0 | 1, x) = TS(0, 0) {}
157
157
|
158
158
159
159
error: unnested or-patterns
160
- --> tests/ui/unnested_or_patterns.rs:44 :12
160
+ --> tests/ui/unnested_or_patterns.rs:49 :12
161
161
|
162
162
LL | if let TS(1, 0) | TS(2, 0) | TS(3, 0) = TS(0, 0) {}
163
163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -169,7 +169,7 @@ LL + if let TS(1 | 2 | 3, 0) = TS(0, 0) {}
169
169
|
170
170
171
171
error: unnested or-patterns
172
- --> tests/ui/unnested_or_patterns.rs:46 :12
172
+ --> tests/ui/unnested_or_patterns.rs:51 :12
173
173
|
174
174
LL | if let TS(x, ..) | TS(x, 1) | TS(x, 2) = TS(0, 0) {}
175
175
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -181,7 +181,7 @@ LL + if let TS(x, ..) | TS(x, 1 | 2) = TS(0, 0) {}
181
181
|
182
182
183
183
error: unnested or-patterns
184
- --> tests/ui/unnested_or_patterns.rs:52 :12
184
+ --> tests/ui/unnested_or_patterns.rs:53 :12
185
185
|
186
186
LL | if let S { x: 0, y } | S { y, x: 1 } = (S { x: 0, y: 1 }) {}
187
187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -193,7 +193,7 @@ LL + if let S { x: 0 | 1, y } = (S { x: 0, y: 1 }) {}
193
193
|
194
194
195
195
error: unnested or-patterns
196
- --> tests/ui/unnested_or_patterns.rs:64 :12
196
+ --> tests/ui/unnested_or_patterns.rs:65 :12
197
197
|
198
198
LL | if let [1] | [53] = [0] {}
199
199
| ^^^^^^^^^^
@@ -205,7 +205,7 @@ LL + if let [1 | 53] = [0] {}
205
205
|
206
206
207
207
error: unnested or-patterns
208
- --> tests/ui/unnested_or_patterns.rs:70 :13
208
+ --> tests/ui/unnested_or_patterns.rs:71 :13
209
209
|
210
210
LL | let (0 | (1 | _)) = 0;
211
211
| ^^^^^^^^^^^^^
@@ -217,7 +217,7 @@ LL + let (0 | 1 | _) = 0;
217
217
|
218
218
219
219
error: unnested or-patterns
220
- --> tests/ui/unnested_or_patterns.rs:73 :16
220
+ --> tests/ui/unnested_or_patterns.rs:74 :16
221
221
|
222
222
LL | if let (0 | (1 | _)) = 0 {}
223
223
| ^^^^^^^^^^^^^
@@ -229,7 +229,7 @@ LL + if let (0 | 1 | _) = 0 {}
229
229
|
230
230
231
231
error: unnested or-patterns
232
- --> tests/ui/unnested_or_patterns.rs:77 :20
232
+ --> tests/ui/unnested_or_patterns.rs:78 :20
233
233
|
234
234
LL | fn or_in_param((x | (x | x)): i32) {}
235
235
| ^^^^^^^^^^^^^
@@ -240,5 +240,17 @@ LL - fn or_in_param((x | (x | x)): i32) {}
240
240
LL + fn or_in_param((x | x | x): i32) {}
241
241
|
242
242
243
- error: aborting due to 20 previous errors
243
+ error: unnested or-patterns
244
+ --> tests/ui/unnested_or_patterns.rs:94:12
245
+ |
246
+ LL | if let S { y, x: 0 } | S { y, x: 1 } = (S { x: 0, y: 1 }) {}
247
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248
+ |
249
+ help: nest the patterns
250
+ |
251
+ LL - if let S { y, x: 0 } | S { y, x: 1 } = (S { x: 0, y: 1 }) {}
252
+ LL + if let S { y, x: 0 | 1 } = (S { x: 0, y: 1 }) {}
253
+ |
254
+
255
+ error: aborting due to 21 previous errors
244
256
0 commit comments