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-10-06 15:06:00 +0000
committerbors <bors@rust-lang.org>2023-10-06 15:06:00 +0000
commit7217c0f3ac15a20dd1cc1d5bc02f084f40db8029 (patch)
tree8377e3179eb0097cd2ee08f1bef3039c86ea00a7 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent279127ce2e5db187501e24631b49d635bae04865 (diff)
parent48d2770e527dd21fd8ae71178d360abd005b6ddc (diff)
downloadrust-7217c0f3ac15a20dd1cc1d5bc02f084f40db8029.tar.gz
rust-7217c0f3ac15a20dd1cc1d5bc02f084f40db8029.zip
Auto merge of #11628 - koka831:fix/11625, r=blyxyas
Improve `redundant_locals` help message

Fixes #11625

AFAIK, `span_lint_and_help` points the beginning of spans when we pass multiple spans to the second argument, so This PR I also modified its help span and its message.

lint result of the given example in the issue will be:

```console
error: redundant redefinition of a binding `apple`
 --> src/main.rs:5:5
  |
5 |     let apple = apple;
  |     ^^^^^^^^^^^^^^^^^^
  |
help: `apple` is initially defined here
 --> src/main.rs:4:9
  |
4 |     let apple = 42;
  |         ^^^^^
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
```

I hope that this change might help reduce user confusion, but I'd appreciate alternative suggestions:)

changelog: [`redundant_locals`]: Now points at the rebinding of the variable
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions