mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user