Note the version and PR of removed features when using it

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
xizheyin
2025-05-27 17:29:17 +08:00
parent c2986eed43
commit b4ba017c33
18 changed files with 71 additions and 21 deletions

View File

@@ -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<FeatureRemovedReason<'a>>,
pub removed_rustc_version: &'a str,
pub current_rustc_version: &'a str,
pub pull_note: String,
}
#[derive(Subdiagnostic)]