mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 18:44:56 +00:00
404bd1a49a
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 |
||
---|---|---|
.. | ||
auxiliary | ||
cargo | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
fmt.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs |