From b4ba017c3306bbdb8f3da3dff80e58ff3ed9a1ab Mon Sep 17 00:00:00 2001 From: xizheyin Date: Tue, 27 May 2025 17:29:17 +0800 Subject: Note the version and PR of removed features when using it Signed-off-by: xizheyin --- compiler/rustc_expand/src/errors.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/rustc_expand/src/errors.rs') diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs index 89bdc7b6dfa..ec0af67c046 100644 --- a/compiler/rustc_expand/src/errors.rs +++ b/compiler/rustc_expand/src/errors.rs @@ -154,12 +154,16 @@ pub(crate) struct HelperAttributeNameInvalid { #[derive(Diagnostic)] #[diag(expand_feature_removed, code = E0557)] +#[note] pub(crate) struct FeatureRemoved<'a> { #[primary_span] #[label] pub span: Span, #[subdiagnostic] pub reason: Option>, + pub removed_rustc_version: &'a str, + pub current_rustc_version: &'a str, + pub pull_note: String, } #[derive(Subdiagnostic)] -- cgit 1.4.1-3-g733a5