Skip to content

Commit 004a3a8

Browse files
Update clippy_dev
1 parent b227f08 commit 004a3a8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

clippy_dev/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn gen_lint_group_list(lints: Vec<Lint>) -> Vec<String> {
7878
if l.is_internal() || l.deprecation.is_some() {
7979
None
8080
} else {
81-
Some(format!(" {}::{},", l.module, l.name.to_uppercase()))
81+
Some(format!(" LintId::of(&{}::{}),", l.module, l.name.to_uppercase()))
8282
}
8383
})
8484
.sorted()
@@ -480,8 +480,8 @@ fn test_gen_lint_group_list() {
480480
Lint::new("incorrect_internal", "internal_style", "abc", None, "module_name"),
481481
];
482482
let expected = vec![
483-
" module_name::ABC,".to_string(),
484-
" module_name::SHOULD_ASSERT_EQ,".to_string(),
483+
" LintId::of(&module_name::ABC),".to_string(),
484+
" LintId::of(&module_name::SHOULD_ASSERT_EQ),".to_string(),
485485
];
486486
assert_eq!(expected, gen_lint_group_list(lints));
487487
}

clippy_dev/src/main.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn main() {
6767
match matches.subcommand() {
6868
("fmt", Some(matches)) => {
6969
fmt::run(matches.is_present("check"), matches.is_present("verbose"));
70-
},
70+
}
7171
("update_lints", Some(matches)) => {
7272
if matches.is_present("print-only") {
7373
print_lints();
@@ -76,8 +76,8 @@ fn main() {
7676
} else {
7777
update_lints(&UpdateMode::Change);
7878
}
79-
},
80-
_ => {},
79+
}
80+
_ => {}
8181
}
8282
}
8383

@@ -183,7 +183,7 @@ fn update_lints(update_mode: &UpdateMode) {
183183
// Generate lists of lints in the clippy::all lint group
184184
file_change |= replace_region_in_file(
185185
"../clippy_lints/src/lib.rs",
186-
r#"reg.register_lint_group\("clippy::all""#,
186+
r#"store.register_group\(true, "clippy::all""#,
187187
r#"\]\);"#,
188188
false,
189189
update_mode == &UpdateMode::Change,
@@ -206,7 +206,7 @@ fn update_lints(update_mode: &UpdateMode) {
206206
for (lint_group, lints) in Lint::by_lint_group(&usable_lints) {
207207
file_change |= replace_region_in_file(
208208
"../clippy_lints/src/lib.rs",
209-
&format!("reg.register_lint_group\\(\"clippy::{}\"", lint_group),
209+
&format!("store.register_group\\(true, \"clippy::{}\"", lint_group),
210210
r#"\]\);"#,
211211
false,
212212
update_mode == &UpdateMode::Change,

0 commit comments

Comments
 (0)