diff options
| author | bors <bors@rust-lang.org> | 2024-10-13 07:34:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-13 07:34:38 +0000 |
| commit | c71f0bebd2179333deea87d281e07f0976a109d6 (patch) | |
| tree | bcda6b20bed41dcd732d2e0a9600c12c5e09dfa7 /compiler/rustc_codegen_llvm/src | |
| parent | 55f6029baa797b916ee8689929a454f10134a9ad (diff) | |
| parent | d1dec199eea9678b0b3d728100ff356b0cd6f216 (diff) | |
| download | rust-c71f0bebd2179333deea87d281e07f0976a109d6.tar.gz rust-c71f0bebd2179333deea87d281e07f0976a109d6.zip | |
Auto merge of #13334 - nyurik:ascii-str-eq, r=xFrednet
Add manual_ignore_cast_cmp lint
```rust
// bad
fn compare(a: &str, b: &str) -> bool {
a.to_ascii_lowercase() == b.to_ascii_lowercase()
|| a.to_ascii_lowercase() == "abc"
}
// good
fn compare(a: &str, b: &str) -> bool {
a.eq_ignore_ascii_case(b)
|| a.eq_ignore_ascii_case("abc")
}
```
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`
changelog: New lint: [`manual_ignore_case_cmp`] `perf`
[#13334](https://github.com/rust-lang/rust-clippy/pull/13334)
Closes #13204
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
