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>2021-06-21 08:41:25 +0000
committerbors <bors@rust-lang.org>2021-06-21 08:41:25 +0000
commit404bd1a49a13fc09770f5f4ba289c0d105ad01c8 (patch)
treedeee520c429766df55797dfaa6a35010a7fc4d06 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentd3327bd837f3bc49a4fd0a8d0754d0ad86acb2c6 (diff)
parent8276f26a4d189e9898aabf09e16605f35fa92318 (diff)
downloadrust-404bd1a49a13fc09770f5f4ba289c0d105ad01c8.tar.gz
rust-404bd1a49a13fc09770f5f4ba289c0d105ad01c8.zip
Auto merge of #7382 - matthiaskrgr:config_name, r=flip1995
Fix wrong config option being suggested for deprecated wrong_pub_self_convention lint

Problem:
for code like
````rust
#![warn(clippy::wrong_pub_self_convention)]
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