diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-06-20 13:48:44 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-06-20 15:54:41 +0200 |
| commit | 8276f26a4d189e9898aabf09e16605f35fa92318 (patch) | |
| tree | cc0ca475d70460300bc23e62cba624f1a86b20f1 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 3120b09151242a2aaf3f5fdf36e6f98e5f6236cc (diff) | |
| download | rust-8276f26a4d189e9898aabf09e16605f35fa92318.tar.gz rust-8276f26a4d189e9898aabf09e16605f35fa92318.zip | |
Fix wrong config option being suggested for deprecated wrong_pub_self_convention lint
Problem:
for code like
````
fn main() {
println!("Hello, world!");
}
````
clippy will issue a warning to use a clippy.toml option instead:
````
warning: lint `clippy::wrong_pub_self_convention` has been removed: set the `avoid_breaking_exported_api` config option to `false` to enable the `wrong_self_convention` lint for public items
--> src/main.rs:2:9
|
2 | #![warn(clippy::wrong_pub_self_convention)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
````
But using the lint name as seen in the warning message
echo "avoid_breaking_exported_api = true\n" > clippy.toml
Will cause an error:
````
error: error reading Clippy's configuration file `/tmp/clippytest/clippy.toml`: unknown field `avoid_breaking_exported_api`, expected one of `avoid-breaking-exported-api`, ...
````
Replace the underscores with dashes in the deprecation message.
changelog: avoid_breaking_exported_api: suggest correct clippy config toml option in the deprecation message
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
