Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compiler/rustc_lint/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ impl LintStore {
})
}

/// Returns all lint group names, including deprecated/aliased groups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other accessor functions in this file seem to be prefixed with get_, such as get_lint_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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading