Auto merge of #11539 - taiki-e:enforced-import-renames, r=Centri3

Warn missing_enforced_import_renames by default

Similar to https://github.com/rust-lang/rust-clippy/pull/8261 that did the same thing to disallowed_methods & disallowed_types.
This lint is also only triggered if import renames are defined in the `clippy.toml` file.

changelog: Moved [`missing_enforced_import_renames`] to `style` (Now warn-by-default)
[#11539](https://github.com/rust-lang/rust-clippy/pull/11539)
This commit is contained in:
bors 2023-10-21 10:40:29 +00:00
commit 23af253fac

View file

@ -17,6 +17,9 @@ declare_clippy_lint! {
/// Checks for imports that do not rename the item as specified /// Checks for imports that do not rename the item as specified
/// in the `enforce-import-renames` config option. /// in the `enforce-import-renames` config option.
/// ///
/// Note: Even though this lint is warn-by-default, it will only trigger if
/// import renames are defined in the clippy.toml file.
///
/// ### Why is this bad? /// ### Why is this bad?
/// Consistency is important, if a project has defined import /// Consistency is important, if a project has defined import
/// renames they should be followed. More practically, some item names are too /// renames they should be followed. More practically, some item names are too
@ -38,7 +41,7 @@ declare_clippy_lint! {
/// ``` /// ```
#[clippy::version = "1.55.0"] #[clippy::version = "1.55.0"]
pub MISSING_ENFORCED_IMPORT_RENAMES, pub MISSING_ENFORCED_IMPORT_RENAMES,
restriction, style,
"enforce import renames" "enforce import renames"
} }