diff options
Diffstat (limited to 'compiler/rustc_lint/src/context.rs')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index cb08e952586..5da77b9f946 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -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( |
