Skip to content

Commit 24ccb15

Browse files
authored
Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead
Parse guard patterns This implements the parsing of [RFC3637 Guard Patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see also [tracking issue](rust-lang/rust#129967)). This PR is extracted from rust-lang/rust#129996 with minor modifications. cc `@max-niederman`
2 parents 7cc19d7 + 3a7a185 commit 24ccb15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/unnested_or_patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ fn transform_with_focus_on_idx(alternatives: &mut ThinVec<P<Pat>>, focus_idx: us
234234
// In the case of only two patterns, replacement adds net characters.
235235
| Ref(_, Mutability::Not)
236236
// Dealt with elsewhere.
237-
| Or(_) | Paren(_) | Deref(_) => false,
237+
| Or(_) | Paren(_) | Deref(_) | Guard(..) => false,
238238
// Transform `box x | ... | box y` into `box (x | y)`.
239239
//
240240
// The cases below until `Slice(...)` deal with *singleton* products.

0 commit comments

Comments
 (0)