diff options
| author | bors <bors@rust-lang.org> | 2024-09-19 22:24:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-19 22:24:46 +0000 |
| commit | 9be28b143993f48cd0756778b28244763cd72e48 (patch) | |
| tree | 097a2c7358ea62526dd0c2de4de68739327efddc /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | 2e5b6801fff90af51323414da014fcb8345421d2 (diff) | |
| parent | 290a01e448e9e17710e03fc28c73de19f5889e5a (diff) | |
| download | rust-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
