diff options
| author | Karol Zwolak <karolzwolak7@gmail.com> | 2025-04-28 09:21:10 +0200 |
|---|---|---|
| committer | Karol Zwolak <karolzwolak7@gmail.com> | 2025-08-19 21:27:10 +0200 |
| commit | 9a29e1693d5122990dcd6c87a5a7b2b2b85f10da (patch) | |
| tree | c432161cb7aaeb9df6c1661ed5b48810cef5a475 /compiler/rustc_lint | |
| parent | 16ad385579cebb6f7d53367c552661b6b51a4a02 (diff) | |
| download | rust-9a29e1693d5122990dcd6c87a5a7b2b2b85f10da.tar.gz rust-9a29e1693d5122990dcd6c87a5a7b2b2b85f10da.zip | |
mention lint group in default level lint note
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index cb159a0b914..e9bd9dccdf1 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -24,7 +24,7 @@ use rustc_middle::ty::layout::{LayoutError, LayoutOfHelpers, TyAndLayout}; use rustc_middle::ty::print::{PrintError, PrintTraitRefExt as _, Printer, with_no_trimmed_paths}; use rustc_middle::ty::{self, GenericArg, RegisteredTools, Ty, TyCtxt, TypingEnv, TypingMode}; use rustc_session::lint::{FutureIncompatibleInfo, Lint, LintBuffer, LintExpectationId, LintId}; -use rustc_session::{LintStoreMarker, Session}; +use rustc_session::{DynLintStore, Session}; use rustc_span::edit_distance::find_best_match_for_names; use rustc_span::{Ident, Span, Symbol, sym}; use tracing::debug; @@ -62,7 +62,13 @@ pub struct LintStore { lint_groups: FxIndexMap<&'static str, LintGroup>, } -impl LintStoreMarker for LintStore {} +impl DynLintStore for LintStore { + fn lint_groups_iter(&self) -> Box<dyn Iterator<Item = rustc_session::LintGroup> + '_> { + Box::new(self.get_lint_groups().map(|(name, lints, is_externally_loaded)| { + rustc_session::LintGroup { name, lints, is_externally_loaded } + })) + } +} /// The target of the `by_name` map, which accounts for renaming/deprecation. #[derive(Debug)] |
