diff options
| author | lcnr <rust@lcnr.de> | 2022-01-05 13:02:16 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-02-01 10:15:59 +0100 |
| commit | a1a30f7548bdb625f8f90c25258f8ab463cebe8c (patch) | |
| tree | 99c2f538217e5b632984902189e1eba204e407b2 /compiler/rustc_lint/src/context.rs | |
| parent | 25862ffc8d360b34dd8ec82a2f01750aaab976b7 (diff) | |
| download | rust-a1a30f7548bdb625f8f90c25258f8ab463cebe8c.tar.gz rust-a1a30f7548bdb625f8f90c25258f8ab463cebe8c.zip | |
add a rustc::query_stability lint
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( |
