diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-08 17:18:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-08 17:18:50 +0100 |
| commit | 24ccb158b8fc8d52f2144150336422db0ea4aa60 (patch) | |
| tree | a6d8eca9291910a6691c6eb810960280a16abf2e | |
| parent | 7cc19d7d1f3aa95359ca95d795291e72ad14d61e (diff) | |
| parent | 3a7a185f7ce7e853d8bcbcdb1a8f316e26719b75 (diff) | |
| download | rust-24ccb158b8fc8d52f2144150336422db0ea4aa60.tar.gz rust-24ccb158b8fc8d52f2144150336422db0ea4aa60.zip | |
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](https://github.com/rust-lang/rust/issues/129967)). This PR is extracted from https://github.com/rust-lang/rust/pull/129996 with minor modifications. cc `@max-niederman`
| -rw-r--r-- | clippy_lints/src/unnested_or_patterns.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/unnested_or_patterns.rs b/clippy_lints/src/unnested_or_patterns.rs index 9d26bf930a1..50a97579df7 100644 --- a/clippy_lints/src/unnested_or_patterns.rs +++ b/clippy_lints/src/unnested_or_patterns.rs @@ -234,7 +234,7 @@ fn transform_with_focus_on_idx(alternatives: &mut ThinVec<P<Pat>>, focus_idx: us // In the case of only two patterns, replacement adds net characters. | Ref(_, Mutability::Not) // Dealt with elsewhere. - | Or(_) | Paren(_) | Deref(_) => false, + | Or(_) | Paren(_) | Deref(_) | Guard(..) => false, // Transform `box x | ... | box y` into `box (x | y)`. // // The cases below until `Slice(...)` deal with *singleton* products. |
