diff options
| author | bors <bors@rust-lang.org> | 2025-07-28 05:25:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-28 05:25:23 +0000 |
| commit | d242a8bd5a73f633ba1ec5aacf19acf35a3c747d (patch) | |
| tree | 0c2c8a3f7ebcbd838f4afef27acad292c7b0bab1 /compiler/rustc_lint/src/nonstandard_style.rs | |
| parent | 733dab558992d902d6d17576de1da768094e2cf3 (diff) | |
| parent | b8eb046e6ee3294969bf8faf31da226b0ea29d18 (diff) | |
| download | rust-d242a8bd5a73f633ba1ec5aacf19acf35a3c747d.tar.gz rust-d242a8bd5a73f633ba1ec5aacf19acf35a3c747d.zip | |
Auto merge of #144469 - Kivooeo:chains-cleanup, r=SparrowLii
Some `let chains` clean-up Not sure if this kind of clean-up is welcoming because of size, but I decided to try out one r? compiler
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, + ); } } } |
