Skip to content

Commit 2965928

Browse files
committed
feat(repeated_is_diagnostic_item): new internal lint
1 parent 3e55ab1 commit 2965928

File tree

8 files changed

+1387
-0
lines changed

8 files changed

+1387
-0
lines changed

clippy_lints_internal/src/internal_paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub static TY_CTXT: PathLookup = type_path!(rustc_middle::ty::TyCtxt);
1717

1818
// Paths in clippy itself
1919
pub static CLIPPY_SYM_MODULE: PathLookup = type_path!(clippy_utils::sym);
20+
pub static MAYBE_DEF: PathLookup = type_path!(clippy_utils::res::MaybeDef);
2021
pub static MSRV_STACK: PathLookup = type_path!(clippy_utils::msrvs::MsrvStack);
2122
pub static PATH_LOOKUP_NEW: PathLookup = value_path!(clippy_utils::paths::PathLookup::new);
2223
pub static SPAN_LINT_AND_THEN: PathLookup = value_path!(clippy_utils::diagnostics::span_lint_and_then);

clippy_lints_internal/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ mod lint_without_lint_pass;
3838
mod msrv_attr_impl;
3939
mod outer_expn_data_pass;
4040
mod produce_ice;
41+
mod repeated_is_diagnostic_item;
4142
mod symbols;
4243
mod unnecessary_def_path;
4344
mod unsorted_clippy_utils_paths;
@@ -77,4 +78,5 @@ pub fn register_lints(store: &mut LintStore) {
7778
store.register_late_pass(|_| Box::new(msrv_attr_impl::MsrvAttrImpl));
7879
store.register_late_pass(|_| Box::new(almost_standard_lint_formulation::AlmostStandardFormulation::new()));
7980
store.register_late_pass(|_| Box::new(unusual_names::UnusualNames));
81+
store.register_late_pass(|_| Box::new(repeated_is_diagnostic_item::RepeatedIsDiagnosticItem));
8082
}

0 commit comments

Comments
 (0)