about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-19 22:24:46 +0000
committerbors <bors@rust-lang.org>2024-09-19 22:24:46 +0000
commit9be28b143993f48cd0756778b28244763cd72e48 (patch)
tree097a2c7358ea62526dd0c2de4de68739327efddc /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent2e5b6801fff90af51323414da014fcb8345421d2 (diff)
parent290a01e448e9e17710e03fc28c73de19f5889e5a (diff)
downloadrust-9be28b143993f48cd0756778b28244763cd72e48.tar.gz
rust-9be28b143993f48cd0756778b28244763cd72e48.zip
Auto merge of #13421 - lukaslueg:issue11212, r=Manishearth
Initial impl of `unnecessary_first_then_check`

Fixes #11212

Checks for `{slice/vec/Box<[]>}.first().is_some()` and suggests replacing the unnecessary `Option`-construct with a direct `{slice/...}.is_empty()`. Other lints guide constructs like `if let Some(_) = v.get(0)` into this, which end up as `!v.is_empty()`.

changelog: [`unnecessary_first_then_check`]: Initial implementation
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions