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:
Jieyou Xu
2025-06-24 10:09:58 +08:00
parent 36b21637e9
commit db11e74723
19 changed files with 29 additions and 44 deletions

View File

@@ -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,
}