about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-22 10:54:16 +0000
committerbors <bors@rust-lang.org>2023-07-22 10:54:16 +0000
commita44dcf80ef522d5fc706d65a5d6a849f49fd623e (patch)
tree1ca35e0e5e95028baeef0285a7acee55708c455c /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent58df1e64cb955c27eeab74b375b27678d6518216 (diff)
parent008ba2b8bb711b8ee725a808f3d9ee65c2a1dce3 (diff)
downloadrust-a44dcf80ef522d5fc706d65a5d6a849f49fd623e.tar.gz
rust-a44dcf80ef522d5fc706d65a5d6a849f49fd623e.zip
Auto merge of #10885 - max-niederman:redundant_local, r=Centri3
new lint: `redundant_locals`

This lint checks for code like the following:

```rs
let x = 1;
let x = x;
```

It checks (afaik) all cases where a binding is shadowed by its own value in the same block, including function parameters. This has no effect and is almost certainly accidental, so it's in the `correctness` category like `self_assignment`.

This also lays the groundwork for a more generalized version of #5102.

changelog: new lint: [`redundant_local`]
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions