about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-02-10 03:57:32 -0800
committerJubilee Young <workingjubilee@gmail.com>2025-02-11 20:18:01 -0800
commit8abff35b41b8de89da35ab851f931d6a582f7670 (patch)
tree9fc31fe88da020be50493a9402cd87796cf35b33 /tests/ui
parent038c183d5f94b5ca3bed351374b01be4b1c90176 (diff)
downloadrust-8abff35b41b8de89da35ab851f931d6a582f7670.tar.gz
rust-8abff35b41b8de89da35ab851f931d6a582f7670.zip
compiler: compare and hash ExternAbi like its string
Directly map each ExternAbi variant to its string and back again.
This has a few advantages:
- By making the ABIs compare equal to their strings, we can easily
  lexicographically sort them and use that sorted slice at runtime.
- We no longer need a workaround to make sure the hashes remain stable,
  as they already naturally are (by being the hashes of unique strings).
- The compiler can carry around less &str wide pointers
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/symbol-names/basic.legacy.stderr4
-rw-r--r--tests/ui/symbol-names/issue-60925.legacy.stderr4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/symbol-names/basic.legacy.stderr b/tests/ui/symbol-names/basic.legacy.stderr
index 2f26c0cf0d3..167262dcf06 100644
--- a/tests/ui/symbol-names/basic.legacy.stderr
+++ b/tests/ui/symbol-names/basic.legacy.stderr
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN5basic4main17h144191e1523a280eE)
+error: symbol-name(_ZN5basic4main17hc88b9d80a69d119aE)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
    | ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(basic::main::h144191e1523a280e)
+error: demangling(basic::main::hc88b9d80a69d119a)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
diff --git a/tests/ui/symbol-names/issue-60925.legacy.stderr b/tests/ui/symbol-names/issue-60925.legacy.stderr
index cc79cc8b516..4e17bdc4577 100644
--- a/tests/ui/symbol-names/issue-60925.legacy.stderr
+++ b/tests/ui/symbol-names/issue-60925.legacy.stderr
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h71f988fda3b6b180E)
+error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hbddb77d6f71afb32E)
   --> $DIR/issue-60925.rs:21:9
    |
 LL |         #[rustc_symbol_name]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h71f988fda3b6b180)
+error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::hbddb77d6f71afb32)
   --> $DIR/issue-60925.rs:21:9
    |
 LL |         #[rustc_symbol_name]