Rollup merge of #152625 - Alexendoo:lint-group-names, r=Kivooeo

Provide all lint group names to Clippy

Unblocks https://github.com/rust-lang/rust-clippy/pull/14689
This commit is contained in:
Jonathan Brouwer
2026-02-15 16:37:38 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -154,6 +154,11 @@ pub fn get_lint_groups(&self) -> impl Iterator<Item = (&'static str, Vec<LintId>
})
}
/// Returns all lint group names, including deprecated/aliased groups
pub fn get_all_group_names(&self) -> impl Iterator<Item = &'static str> {
self.lint_groups.keys().copied()
}
pub fn register_early_pass(
&mut self,
pass: impl Fn() -> EarlyLintPassObject + 'static + sync::DynSend + sync::DynSync,
@@ -135,7 +135,7 @@ pub fn check(cx: &LateContext<'_>) {
{
let mut rustc_groups = FxHashSet::default();
let mut clippy_groups = FxHashSet::default();
for (group, ..) in unerased_lint_store(cx.tcx.sess).get_lint_groups() {
for group in unerased_lint_store(cx.tcx.sess).get_all_group_names() {
match group.split_once("::") {
None => {
rustc_groups.insert(group);