diff options
| author | Max Niederman <max@maxniederman.com> | 2024-10-05 22:09:20 -0700 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2024-11-24 19:42:33 +0100 |
| commit | f86915a6828b64abfa75936ab0f1cddf7fdf7fee (patch) | |
| tree | dcd4aa91376f6b89090d9926bd6bf52d87d060ef | |
| parent | a3a29f50ef9f59ccd2e9178ff439d9825d79522f (diff) | |
| download | rust-f86915a6828b64abfa75936ab0f1cddf7fdf7fee.tar.gz rust-f86915a6828b64abfa75936ab0f1cddf7fdf7fee.zip | |
cover guard patterns in clippy lints
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs b/src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs index c7c837de505..c649d5e5e1e 100644 --- a/src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs +++ b/src/tools/clippy/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. |
