about summary refs log tree commit diff
path: root/tests/ui/deprecation
diff options
context:
space:
mode:
authorJieyou Xu <jieyouxu@outlook.com>2025-06-24 10:09:58 +0800
committerJieyou Xu <jieyouxu@outlook.com>2025-06-24 23:32:09 +0800
commitdb11e747230caa23aad3f159e42dc3b47baf7557 (patch)
tree9c6af9394f2bb0d8f94b85a416b1c063a31361d6 /tests/ui/deprecation
parent36b21637e93b038453924d3c66821089e71d8baa (diff)
downloadrust-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/deprecation')
-rw-r--r--tests/ui/deprecation/deprecated_no_stack_check.rs2
-rw-r--r--tests/ui/deprecation/deprecated_no_stack_check.stderr4
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/ui/deprecation/deprecated_no_stack_check.rs b/tests/ui/deprecation/deprecated_no_stack_check.rs
index 64635c5f5e8..8e1f5bbf045 100644
--- a/tests/ui/deprecation/deprecated_no_stack_check.rs
+++ b/tests/ui/deprecation/deprecated_no_stack_check.rs
@@ -1,5 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![deny(warnings)]
 #![feature(no_stack_check)]
 //~^ ERROR: feature has been removed [E0557]
diff --git a/tests/ui/deprecation/deprecated_no_stack_check.stderr b/tests/ui/deprecation/deprecated_no_stack_check.stderr
index 2d08b1b8db5..33788661d73 100644
--- a/tests/ui/deprecation/deprecated_no_stack_check.stderr
+++ b/tests/ui/deprecation/deprecated_no_stack_check.stderr
@@ -1,10 +1,10 @@
 error[E0557]: feature has been removed
-  --> $DIR/deprecated_no_stack_check.rs:4:12
+  --> $DIR/deprecated_no_stack_check.rs:2:12
    |
 LL | #![feature(no_stack_check)]
    |            ^^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.0.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/40110> for more information
+   = note: removed in 1.0.0; see <https://github.com/rust-lang/rust/pull/40110> for more information
 
 error: aborting due to 1 previous error