basic lint v2 implemented

This commit is contained in:
Arthur Lafrance 2023-09-25 00:15:00 -07:00
parent 8769e02d0b
commit f77dea89e1
8 changed files with 69 additions and 43 deletions

View file

@ -83,7 +83,6 @@ mod passes;
mod ptr_nulls;
mod redundant_semicolon;
mod reference_casting;
mod span_use_eq_ctxt;
mod traits;
mod types;
mod unused;
@ -532,6 +531,8 @@ fn register_internals(store: &mut LintStore) {
store.register_late_mod_pass(|_| Box::new(BadOptAccess));
store.register_lints(&PassByValue::get_lints());
store.register_late_mod_pass(|_| Box::new(PassByValue));
store.register_lints(&SpanUseEqCtxt::get_lints());
store.register_late_mod_pass(|_| Box::new(SpanUseEqCtxt));
// FIXME(davidtwco): deliberately do not include `UNTRANSLATABLE_DIAGNOSTIC` and
// `DIAGNOSTIC_OUTSIDE_OF_IMPL` here because `-Wrustc::internal` is provided to every crate and
// these lints will trigger all of the time - change this once migration to diagnostic structs
@ -549,6 +550,7 @@ fn register_internals(store: &mut LintStore) {
LintId::of(USAGE_OF_QUALIFIED_TY),
LintId::of(EXISTING_DOC_KEYWORD),
LintId::of(BAD_OPT_ACCESS),
LintId::of(SPAN_USE_EQ_CTXT),
],
);
}