1
Fork 0

add a rustc::query_stability lint

This commit is contained in:
lcnr 2022-01-05 13:02:16 +01:00
parent 25862ffc8d
commit a1a30f7548
42 changed files with 302 additions and 77 deletions

View file

@ -143,7 +143,11 @@ impl LintStore {
&self.lints
}
pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)> {
pub fn get_lint_groups<'t>(
&'t self,
) -> impl Iterator<Item = (&'static str, Vec<LintId>, bool)> + 't {
// This function is not used in a way which observes the order of lints.
#[cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
self.lint_groups
.iter()
.filter(|(_, LintGroup { depr, .. })| {
@ -153,7 +157,6 @@ impl LintStore {
.map(|(k, LintGroup { lint_ids, from_plugin, .. })| {
(*k, lint_ids.clone(), *from_plugin)
})
.collect()
}
pub fn register_early_pass(