Improve multiple_inherent_impl lint

Treat different generic arguments as different types.
Allow the lint to be ignored on the type definition, or any impl blocks.
This commit is contained in:
Jason Newcomb
2021-04-15 12:20:43 -04:00
parent b1c675f3fc
commit 760f70312e
4 changed files with 155 additions and 47 deletions

View File

@@ -1154,7 +1154,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_early_pass(|| box suspicious_operation_groupings::SuspiciousOperationGroupings);
store.register_late_pass(|| box suspicious_trait_impl::SuspiciousImpl);
store.register_late_pass(|| box map_unit_fn::MapUnit);
store.register_late_pass(|| box inherent_impl::MultipleInherentImpl::default());
store.register_late_pass(|| box inherent_impl::MultipleInherentImpl);
store.register_late_pass(|| box neg_cmp_op_on_partial_ord::NoNegCompOpForPartialOrd);
store.register_late_pass(|| box unwrap::Unwrap);
store.register_late_pass(|| box duration_subsec::DurationSubsec);