diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-26 06:21:54 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-28 06:10:14 +0500 |
| commit | bae38bad7803be7fdf1878188da9650f82548016 (patch) | |
| tree | 6ac78d3032bec33e133feaf8f9aa4e8027cb362d /compiler/rustc_lint/src/nonstandard_style.rs | |
| parent | 43725ed819c57b86b32a66c40572246b1f5b8952 (diff) | |
| download | rust-bae38bad7803be7fdf1878188da9650f82548016.tar.gz rust-bae38bad7803be7fdf1878188da9650f82548016.zip | |
use let chains in hir, lint, mir
Diffstat (limited to 'compiler/rustc_lint/src/nonstandard_style.rs')
| -rw-r--r-- | compiler/rustc_lint/src/nonstandard_style.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index db89396d1dc..76e374deef6 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -623,15 +623,15 @@ impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals { .. }) = p.kind { - if let Res::Def(DefKind::Const, _) = path.res { - if let [segment] = path.segments { - NonUpperCaseGlobals::check_upper_case( - cx, - "constant in pattern", - None, - &segment.ident, - ); - } + if let Res::Def(DefKind::Const, _) = path.res + && let [segment] = path.segments + { + NonUpperCaseGlobals::check_upper_case( + cx, + "constant in pattern", + None, + &segment.ident, + ); } } } |
