diff options
| author | Devin Ragotzy <devin.ragotzy@gmail.com> | 2021-05-31 14:15:17 -0400 |
|---|---|---|
| committer | Devin Ragotzy <devin.ragotzy@gmail.com> | 2021-06-24 16:13:02 -0400 |
| commit | 9492de584319c0331619991e5b201ea6e00b9b2f (patch) | |
| tree | 3dd215ca0c8977319593dd73c9bf3f94620102e5 /clippy_lints/src/lib.rs | |
| parent | 86bf28dfab88118a22e5c9b46ac7d9634ac54908 (diff) | |
| download | rust-9492de584319c0331619991e5b201ea6e00b9b2f.tar.gz rust-9492de584319c0331619991e5b201ea6e00b9b2f.zip | |
Add import_rename lint, this adds a field on the Conf struct
Rename lint and fix review issues
Diffstat (limited to 'clippy_lints/src/lib.rs')
| -rw-r--r-- | clippy_lints/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 03e093f4c03..9cffeeb0224 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -267,6 +267,7 @@ mod misc; mod misc_early; mod missing_const_for_fn; mod missing_doc; +mod missing_enforced_import_rename; mod missing_inline; mod modulo_arithmetic; mod multiple_crate_versions; @@ -813,6 +814,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: misc_early::ZERO_PREFIXED_LITERAL, missing_const_for_fn::MISSING_CONST_FOR_FN, missing_doc::MISSING_DOCS_IN_PRIVATE_ITEMS, + missing_enforced_import_rename::MISSING_ENFORCED_IMPORT_RENAMES, missing_inline::MISSING_INLINE_IN_PUBLIC_ITEMS, modulo_arithmetic::MODULO_ARITHMETIC, multiple_crate_versions::MULTIPLE_CRATE_VERSIONS, @@ -1017,6 +1019,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(misc::FLOAT_CMP_CONST), LintId::of(misc_early::UNNEEDED_FIELD_PATTERN), LintId::of(missing_doc::MISSING_DOCS_IN_PRIVATE_ITEMS), + LintId::of(missing_enforced_import_rename::MISSING_ENFORCED_IMPORT_RENAMES), LintId::of(missing_inline::MISSING_INLINE_IN_PUBLIC_ITEMS), LintId::of(modulo_arithmetic::MODULO_ARITHMETIC), LintId::of(panic_in_result_fn::PANIC_IN_RESULT_FN), @@ -2077,6 +2080,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: store.register_late_pass(|| box unused_async::UnusedAsync); let disallowed_types = conf.disallowed_types.iter().cloned().collect::<FxHashSet<_>>(); store.register_late_pass(move || box disallowed_type::DisallowedType::new(&disallowed_types)); + let import_renames = conf.enforced_import_renames.clone(); + store.register_late_pass(move || box missing_enforced_import_rename::ImportRename::new(import_renames.clone())); } |
