diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-08-22 01:08:34 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-08-22 02:01:01 -0700 |
| commit | b5c714cfc1c0f61cb5d4829d7db223cf9ebb0c72 (patch) | |
| tree | 9ecfe8769683ce70144171c6f1b22afe02779677 /compiler/rustc_session/src/errors.rs | |
| parent | c99320156dfeea98836fe7dad97d16f67c4d879e (diff) | |
| download | rust-b5c714cfc1c0f61cb5d4829d7db223cf9ebb0c72.tar.gz rust-b5c714cfc1c0f61cb5d4829d7db223cf9ebb0c72.zip | |
Migrate `BuiltinLintDiag::UnexpectedBuiltinCfg` to use `LintDiagnostic` directly
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
| -rw-r--r-- | compiler/rustc_session/src/errors.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index 9471807df01..34da54a20bf 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -7,7 +7,7 @@ use rustc_errors::{ Diag, DiagCtxtHandle, DiagMessage, Diagnostic, EmissionGuarantee, ErrorGuaranteed, Level, MultiSpan, }; -use rustc_macros::{Diagnostic, Subdiagnostic}; +use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_span::{Span, Symbol}; use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTuple}; @@ -505,3 +505,13 @@ pub(crate) struct SoftFloatIgnored; #[note] #[note(session_soft_float_deprecated_issue)] pub(crate) struct SoftFloatDeprecated; + +#[derive(LintDiagnostic)] +#[diag(session_unexpected_builtin_cfg)] +#[note(session_controlled_by)] +#[note(session_incoherent)] +pub(crate) struct UnexpectedBuiltinCfg { + pub(crate) cfg: String, + pub(crate) cfg_name: Symbol, + pub(crate) controlled_by: &'static str, +} |
