diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-29 12:34:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-29 12:34:47 +0100 |
| commit | 071f8f610dbf9d288c0b3e37597351abe17b7aed (patch) | |
| tree | 3c579dae8b48114268701254c9ea8d7f58dc97f2 /clippy_lints/src/unnested_or_patterns.rs | |
| parent | 684c4bfef156e5c0243ca70906db5cc9179fc0ca (diff) | |
| parent | 02e50f03bf361d987c06cf7033a2d5efece74d20 (diff) | |
Rollup merge of #118157 - Nadrieril:never_pat-feature-gate, r=compiler-errors
Add `never_patterns` feature gate This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (https://github.com/rust-lang/rust/issues/118155) for details on the experiment. `@scottmcm` has agreed to be my lang-team liaison for this experiment.
Diffstat (limited to 'clippy_lints/src/unnested_or_patterns.rs')
| -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 8ff088a208f..952c0dc72b1 100644 --- a/clippy_lints/src/unnested_or_patterns.rs +++ b/clippy_lints/src/unnested_or_patterns.rs @@ -226,7 +226,7 @@ fn transform_with_focus_on_idx(alternatives: &mut ThinVec<P<Pat>>, focus_idx: us // Therefore they are not some form of constructor `C`, // with which a pattern `C(p_0)` may be formed, // which we would want to join with other `C(p_j)`s. - Ident(.., None) | Lit(_) | Wild | Path(..) | Range(..) | Rest | MacCall(_) + Ident(.., None) | Lit(_) | Wild | Never | Path(..) | Range(..) | Rest | MacCall(_) // Skip immutable refs, as grouping them saves few characters, // and almost always requires adding parens (increasing noisiness). // In the case of only two patterns, replacement adds net characters. |
