Don't include current rustc version string in feature removed help
The version string is difficult to properly normalize out, and removing it isn't a huge deal (the user can query version info easily through `rustc --version` or `cargo --version`). The normalization options were all non-ideal: - Per-test version string normalization is nasty to maintain, and we need to maintain `n` copies of it. - Centralized compiletest normalization (with a directive opt-out) is also not ideal, because `cfg(version(..))` tests can't have those accidentally normalized out (and you'd have to remember to opt-out).
This commit is contained in:
@@ -92,7 +92,6 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
|
||||
span: mi.span(),
|
||||
reason: f.reason.map(|reason| FeatureRemovedReason { reason }),
|
||||
removed_rustc_version: f.feature.since,
|
||||
current_rustc_version: sess.cfg_version,
|
||||
pull_note,
|
||||
});
|
||||
continue;
|
||||
|
||||
@@ -162,7 +162,6 @@ pub(crate) struct FeatureRemoved<'a> {
|
||||
#[subdiagnostic]
|
||||
pub reason: Option<FeatureRemovedReason<'a>>,
|
||||
pub removed_rustc_version: &'a str,
|
||||
pub current_rustc_version: &'a str,
|
||||
pub pull_note: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user