about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-10 01:13:42 +0000
committerbors <bors@rust-lang.org>2024-01-10 01:13:42 +0000
commite89968425495ad99ce16bd00a6d7a3f63648271b (patch)
tree7e8ac38b3409cfdbd7601d86911cbd5da33de8f3 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3b8323d79024efb4ed4664faa4f29a1a7117177a (diff)
parentf7ef9a6f1fd1ea4126ec1e9173b23baa8449906c (diff)
downloadrust-e89968425495ad99ce16bd00a6d7a3f63648271b.tar.gz
rust-e89968425495ad99ce16bd00a6d7a3f63648271b.zip
Auto merge of #12105 - GuillaumeGomez:useless-asf-extension, r=llogiq
Extend `useless_asref` lint on `map(clone)`

If you have code like:

```rust
Some(String::new()).as_ref().map(Clone::clone)
```

the `as_ref` call is unneeded.

Interestingly enough, this lint and `map_clone` are starting to share a same "space" where both lints warn about different things for the same code. Not sure what's the policy about such cases though...

r? `@llogiq`

changelog: Extend `useless_asref` lint on `map(clone)`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions