Auto merge of #7880 - Alexendoo:newlint-add-pass, r=flip1995

Register the generated lints from `cargo dev new_lint`

How to register a lint was something that took me a couple reads to figure out, this will hopefully make that easier. It appends the created lint to the end of the list when running `cargo dev new_lint`

changelog: none
This commit is contained in:
bors
2021-10-27 07:33:00 +00:00
3 changed files with 54 additions and 33 deletions

View File

@@ -777,7 +777,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_late_pass(|| Box::new(match_str_case_mismatch::MatchStrCaseMismatch));
store.register_late_pass(move || Box::new(format_args::FormatArgs));
store.register_late_pass(|| Box::new(trailing_empty_array::TrailingEmptyArray));
// add lints here, do not remove this comment, it's used in `new_lint`
}
#[rustfmt::skip]