about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-18 23:35:03 +0000
committerbors <bors@rust-lang.org>2021-11-18 23:35:03 +0000
commit2776076efa23eceb07897ee54a0a6ce4535dd98c (patch)
treebf7814c9f6abbb7c0da7d63e14b286b8879a586e /compiler/rustc_codegen_llvm/src
parent8dd1bce2632ef2d26938abc30b726e29abf03a49 (diff)
parent8ded385ddc7e48b4e80633b7b66bb0ea2e56ec38 (diff)
downloadrust-2776076efa23eceb07897ee54a0a6ce4535dd98c.tar.gz
rust-2776076efa23eceb07897ee54a0a6ce4535dd98c.zip
Auto merge of #7977 - Jarcho:multi_needless_borrow, r=xFrednet
Improve `needless_borrow` lint

fixes: #5327
fixes: #1726
fixes: #1212

This is merging `needless_borrow` into the `dereference` pass in preparation for `explicit_auto_deref`. `explicit_auto_deref` needs to implement most of what `needless_borrow` implements in order to work.

There is a minor regression here where `let x: &str = &x.deref()` will trigger `needless_borrow` without triggering `explicit_deref_methods`. Removing the redundant borrow will cause `explicit_deref_methods` to trigger. This will be fixed when `explicit_auto_deref` is implemented.

changelog: Lint `needless_borrow` when a borrow is auto-derefed more than once
changelog: Lint `needless_borrow` in the trailing expression of a block for a match arm
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions