diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-06-24 10:09:58 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-06-24 23:32:09 +0800 |
| commit | db11e747230caa23aad3f159e42dc3b47baf7557 (patch) | |
| tree | 9c6af9394f2bb0d8f94b85a416b1c063a31361d6 /tests/ui/unsized-locals | |
| parent | 36b21637e93b038453924d3c66821089e71d8baa (diff) | |
| download | rust-db11e747230caa23aad3f159e42dc3b47baf7557.tar.gz rust-db11e747230caa23aad3f159e42dc3b47baf7557.zip | |
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).
Diffstat (limited to 'tests/ui/unsized-locals')
| -rw-r--r-- | tests/ui/unsized-locals/yote.rs | 2 | ||||
| -rw-r--r-- | tests/ui/unsized-locals/yote.stderr | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/ui/unsized-locals/yote.rs b/tests/ui/unsized-locals/yote.rs index f09db9dd006..1de75a6ce61 100644 --- a/tests/ui/unsized-locals/yote.rs +++ b/tests/ui/unsized-locals/yote.rs @@ -1,4 +1,2 @@ -//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION" - #![feature(unsized_locals)] //~ERROR feature has been removed #![crate_type = "lib"] diff --git a/tests/ui/unsized-locals/yote.stderr b/tests/ui/unsized-locals/yote.stderr index 655aad5360c..8e7da64038a 100644 --- a/tests/ui/unsized-locals/yote.stderr +++ b/tests/ui/unsized-locals/yote.stderr @@ -1,10 +1,10 @@ error[E0557]: feature has been removed - --> $DIR/yote.rs:3:12 + --> $DIR/yote.rs:1:12 | LL | #![feature(unsized_locals)] | ^^^^^^^^^^^^^^ feature has been removed | - = note: removed in CURRENT_RUSTC_VERSION (you are using $RUSTC_VERSION) + = note: removed in CURRENT_RUSTC_VERSION = note: removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942 error: aborting due to 1 previous error |
