Skip to content

Commit f86915a

Browse files
max-niedermanNadrieril
authored andcommitted
cover guard patterns in clippy lints
1 parent a3a29f5 commit f86915a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs

+1-1
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)