about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-03-02 00:50:09 +0100
committerGitHub <noreply@github.com>2021-03-02 00:50:09 +0100
commitd259d1d98a31b299d8c64abf5be429468329dec8 (patch)
treea32fbe047b2e95200daf2c97260bf131cab69309 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent5a82251e9207e9dbec619e92a5072b688b83aa45 (diff)
parent3c63f67802c728bd84953c19735fabd8f071c326 (diff)
downloadrust-d259d1d98a31b299d8c64abf5be429468329dec8.tar.gz
rust-d259d1d98a31b299d8c64abf5be429468329dec8.zip
Rollup merge of #82655 - SkiFire13:fix-issue-81314, r=estebank
Highlight identifier span instead of whole pattern span in `unused` lint

Fixes #81314

This pretty much just changes the span highlighted in the lint from `pat_sp` to `ident.span`. There's however an exception, which is in patterns with shorthands like `Point { y, ref mut x }`, where a suggestion to change just `x` would be invalid; in those cases I had to keep the pattern span. Another option would be suggesting something like `Point { y, x: ref mut _x }`.

I also added a new test since there weren't any test that checked the `unused` lint with optional patterns.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions