diff options
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
| -rw-r--r-- | compiler/rustc_session/src/errors.rs | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index b672e760feb..24782b41cc8 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -31,6 +31,22 @@ pub struct FeatureDiagnosticForIssue { } #[derive(Subdiagnostic)] +#[note(session_feature_suggest_upgrade_compiler)] +pub struct SuggestUpgradeCompiler { + version: &'static str, + date: &'static str, +} + +impl SuggestUpgradeCompiler { + pub fn new() -> Self { + let version = option_env!("CFG_VERSION").unwrap_or("unknown"); + let date = option_env!("CFG_VER_DATE").unwrap_or("unknown"); + + Self { version, date } + } +} + +#[derive(Subdiagnostic)] #[help(session_feature_diagnostic_help)] pub struct FeatureDiagnosticHelp { pub feature: Symbol, | 
