@@ -214,21 +214,21 @@ fn transform_with_focus_on_idx(alternatives: &mut Vec<P<Pat>>, focus_idx: usize)
214214 let changed = match & mut focus_kind {
215215 // These pattern forms are "leafs" and do not have sub-patterns.
216216 // 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.
219219 Ident ( .., None ) | Lit ( _) | Wild | Path ( ..) | Range ( ..) | Rest | MacCall ( _)
220220 // Dealt with elsewhere.
221221 | Or ( _) | Paren ( _) => false ,
222222 // Transform `box x | ... | box y` into `box (x | y)`.
223223 //
224- // The cases below until `Slice(...)` deal *singleton* products.
224+ // The cases below until `Slice(...)` deal with *singleton* products.
225225 // These patterns have the shape `C(p)`, and not e.g., `C(p0, ..., pn)`.
226226 Box ( target) => extend_with_matching (
227227 target, start, alternatives,
228228 |k| matches ! ( k, Box ( _) ) ,
229229 |k| always_pat ! ( k, Box ( p) => p) ,
230230 ) ,
231- // Transform `&m x | ... | &m y` into `&m (x, y)`.
231+ // Transform `&m x | ... | &m y` into `&m (x | y)`.
232232 Ref ( target, m1) => extend_with_matching (
233233 target, start, alternatives,
234234 |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)
247247 |k, ps1, idx| matches ! ( k, Slice ( ps2) if eq_pre_post( ps1, ps2, idx) ) ,
248248 |k| always_pat ! ( k, Slice ( ps) => ps) ,
249249 ) ,
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) `.
251251 Tuple ( ps1) => extend_with_matching_product (
252252 ps1, start, alternatives,
253253 |k, ps1, idx| matches ! ( k, Tuple ( ps2) if eq_pre_post( ps1, ps2, idx) ) ,
254254 |k| always_pat ! ( k, Tuple ( ps) => ps) ,
255255 ) ,
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) `.
257257 TupleStruct ( path1, ps1) => extend_with_matching_product (
258258 ps1, start, alternatives,
259259 |k, ps1, idx| matches ! (
0 commit comments