Skip to content

Commit ee17e8c

Browse files
Rollup merge of #152625 - Alexendoo:lint-group-names, r=Kivooeo
Provide all lint group names to Clippy Unblocks rust-lang/rust-clippy#14689
2 parents c5a12fb + 54875f6 commit ee17e8c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

compiler/rustc_lint/src/context.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ impl LintStore {
154154
})
155155
}
156156

157+
/// Returns all lint group names, including deprecated/aliased groups
158+
pub fn get_all_group_names(&self) -> impl Iterator<Item = &'static str> {
159+
self.lint_groups.keys().copied()
160+
}
161+
157162
pub fn register_early_pass(
158163
&mut self,
159164
pass: impl Fn() -> EarlyLintPassObject + 'static + sync::DynSend + sync::DynSync,

src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub fn check(cx: &LateContext<'_>) {
135135
{
136136
let mut rustc_groups = FxHashSet::default();
137137
let mut clippy_groups = FxHashSet::default();
138-
for (group, ..) in unerased_lint_store(cx.tcx.sess).get_lint_groups() {
138+
for group in unerased_lint_store(cx.tcx.sess).get_all_group_names() {
139139
match group.split_once("::") {
140140
None => {
141141
rustc_groups.insert(group);

0 commit comments

Comments
 (0)