@@ -214,21 +214,21 @@ fn transform_with_focus_on_idx(alternatives: &mut Vec<P<Pat>>, focus_idx: usize)
214
214
let changed = match & mut focus_kind {
215
215
// These pattern forms are "leafs" and do not have sub-patterns.
216
216
// Therefore they are not some form of constructor `C`,
217
- // with which a pattern `C(P0 )` may be formed,
218
- // which we would want to join with other `C(Pj )`s.
217
+ // with which a pattern `C(p_0 )` may be formed,
218
+ // which we would want to join with other `C(p_j )`s.
219
219
Ident ( .., None ) | Lit ( _) | Wild | Path ( ..) | Range ( ..) | Rest | MacCall ( _)
220
220
// Dealt with elsewhere.
221
221
| Or ( _) | Paren ( _) => false ,
222
222
// Transform `box x | ... | box y` into `box (x | y)`.
223
223
//
224
- // The cases below until `Slice(...)` deal *singleton* products.
224
+ // The cases below until `Slice(...)` deal with *singleton* products.
225
225
// These patterns have the shape `C(p)`, and not e.g., `C(p0, ..., pn)`.
226
226
Box ( target) => extend_with_matching (
227
227
target, start, alternatives,
228
228
|k| matches ! ( k, Box ( _) ) ,
229
229
|k| always_pat ! ( k, Box ( p) => p) ,
230
230
) ,
231
- // Transform `&m x | ... | &m y` into `&m (x, y)`.
231
+ // Transform `&m x | ... | &m y` into `&m (x | y)`.
232
232
Ref ( target, m1) => extend_with_matching (
233
233
target, start, alternatives,
234
234
|k| matches ! ( k, Ref ( _, m2) if m1 == m2) , // Mutabilities must match.
@@ -247,13 +247,13 @@ fn transform_with_focus_on_idx(alternatives: &mut Vec<P<Pat>>, focus_idx: usize)
247
247
|k, ps1, idx| matches ! ( k, Slice ( ps2) if eq_pre_post( ps1, ps2, idx) ) ,
248
248
|k| always_pat ! ( k, Slice ( ps) => ps) ,
249
249
) ,
250
- // Transform `(pre, x, post) | ... | (pre, y, post)` into `(pre, x | y, post] `.
250
+ // Transform `(pre, x, post) | ... | (pre, y, post)` into `(pre, x | y, post) `.
251
251
Tuple ( ps1) => extend_with_matching_product (
252
252
ps1, start, alternatives,
253
253
|k, ps1, idx| matches ! ( k, Tuple ( ps2) if eq_pre_post( ps1, ps2, idx) ) ,
254
254
|k| always_pat ! ( k, Tuple ( ps) => ps) ,
255
255
) ,
256
- // Transform `S(pre, x, post) | ... | S(pre, y, post)` into `S(pre, x | y, post] `.
256
+ // Transform `S(pre, x, post) | ... | S(pre, y, post)` into `S(pre, x | y, post) `.
257
257
TupleStruct ( path1, ps1) => extend_with_matching_product (
258
258
ps1, start, alternatives,
259
259
|k, ps1, idx| matches ! (
0 commit comments