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>2020-11-26 18:51:45 +0000
committerbors <bors@rust-lang.org>2020-11-26 18:51:45 +0000
commitf303168a0d374c7e6d0b0aa9fd7852042602f791 (patch)
treefb270adbf9c5377c583554f0cb0b1cbc84f332f6 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentf6827839c0b3e81f07c522fc28b5a2406025acaf (diff)
parent03f04314dd715db631214ed4c5fa8243dc17eb1c (diff)
downloadrust-f303168a0d374c7e6d0b0aa9fd7852042602f791.tar.gz
rust-f303168a0d374c7e6d0b0aa9fd7852042602f791.zip
Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearth
Always print lints from plugins, if they're available

Currently you can get a list of lints and lint groups by running `rustc
-Whelp`. This prints an additional line at the end:
```
Compiler plugins can provide additional lints and lint groups. To see a listing of these, re-run `rustc -W help` with a crate filename.
```

Clippy is such a "compiler plugin", that provides additional lints.
Running `clippy-driver -Whelp` (`rustc` wrapper) still only prints the
rustc lints with the above message at the end. But when running
`clippy-driver -Whelp main.rs`, where `main.rs` is any rust file, it
also prints Clippy lints. I don't think this is a good approach from a
UX perspective: Why is a random file necessary to print a help message?

This PR changes this behavior: Whenever a compiler callback
registers lints, it is assumed that these lints come from a plugin and
are printed without having to specify a Rust source file.

Fixes rust-lang/rust-clippy#6122

cc `@Manishearth` `@ebroto` for the Clippy changes.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions