diff options
| author | bors <bors@rust-lang.org> | 2023-07-22 10:54:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-22 10:54:16 +0000 |
| commit | a44dcf80ef522d5fc706d65a5d6a849f49fd623e (patch) | |
| tree | 1ca35e0e5e95028baeef0285a7acee55708c455c /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 58df1e64cb955c27eeab74b375b27678d6518216 (diff) | |
| parent | 008ba2b8bb711b8ee725a808f3d9ee65c2a1dce3 (diff) | |
| download | rust-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_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
