Skip to content

Commit

Permalink
Auto merge of rust-lang#11539 - taiki-e:enforced-import-renames, r=Ce…
Browse files Browse the repository at this point in the history
…ntri3

Warn missing_enforced_import_renames by default

Similar to rust-lang/rust-clippy#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)
[rust-lang#11539](rust-lang/rust-clippy#11539)
  • Loading branch information
bors committed Oct 21, 2023
2 parents 090df7a + 77c121e commit 23af253
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clippy_lints/src/missing_enforced_import_rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ declare_clippy_lint! {
/// Checks for imports that do not rename the item as specified
/// 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?
/// Consistency is important, if a project has defined import
/// renames they should be followed. More practically, some item names are too
Expand All @@ -38,7 +41,7 @@ declare_clippy_lint! {
/// ```
#[clippy::version = "1.55.0"]
pub MISSING_ENFORCED_IMPORT_RENAMES,
restriction,
style,
"enforce import renames"
}

Expand Down

0 comments on commit 23af253

Please sign in to comment.