about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-14 11:09:59 +0100
committerGitHub <noreply@github.com>2024-03-14 11:09:59 +0100
commit0286591d595454ba73a70985a02065471733b025 (patch)
treedc91097a84e1717c1c60037443f42902c1bf950e /compiler/rustc_codegen_llvm/src/llvm_util.rs
parentbd53d1eee30af57593460a88831bd6f991da6d64 (diff)
parentf2fcfe82af65dd7a2fbc20ca082e1a6794918d0e (diff)
downloadrust-0286591d595454ba73a70985a02065471733b025.tar.gz
rust-0286591d595454ba73a70985a02065471733b025.zip
Rollup merge of #122416 - Zalathar:levels, r=petrochenkov
Various style improvements to `rustc_lint::levels`

While reading this file, I noticed a few opportunities to make things a little nicer:

- Replace some nested if-let with let-chains
- Tweak a match pattern to allow shorthand struct syntax
- Fuse an `is_empty` check with getting the last element
- Merge some common code that emits `MalformedAttribute` and continues
- Format `"{tool}::{name}"` in a way that's consistent with other match arms
- Replace if-let-else-panic with let-else
- Use early-exit to flatten a method body

Some of these changes cause indentation churn, so ignoring whitespace is recommended.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions