Skip to content

Commit 30dba97

Browse files
committed
Normalize symbol hash in ui test for legacy symbol mangling, as it's dependent on the
number of bits within consts.
1 parent 02fffc1 commit 30dba97

File tree

3 files changed

+28
-26
lines changed

3 files changed

+28
-26
lines changed

src/test/ui/symbol-names/impl1.legacy.stderr

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
error: symbol-name(_ZN5impl13foo3Foo3bar17h92cf46db76791039E)
2-
--> $DIR/impl1.rs:14:9
2+
--> $DIR/impl1.rs:16:9
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

77
error: demangling(impl1::foo::Foo::bar::h92cf46db76791039)
8-
--> $DIR/impl1.rs:14:9
8+
--> $DIR/impl1.rs:16:9
99
|
1010
LL | #[rustc_symbol_name]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
error: demangling-alt(impl1::foo::Foo::bar)
14-
--> $DIR/impl1.rs:14:9
14+
--> $DIR/impl1.rs:16:9
1515
|
1616
LL | #[rustc_symbol_name]
1717
| ^^^^^^^^^^^^^^^^^^^^
1818

1919
error: def-path(foo::Foo::bar)
20-
--> $DIR/impl1.rs:21:9
20+
--> $DIR/impl1.rs:23:9
2121
|
2222
LL | #[rustc_def_path]
2323
| ^^^^^^^^^^^^^^^^^
2424

2525
error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h90c4a800b1aa0df0E)
26-
--> $DIR/impl1.rs:32:9
26+
--> $DIR/impl1.rs:34:9
2727
|
2828
LL | #[rustc_symbol_name]
2929
| ^^^^^^^^^^^^^^^^^^^^
3030

3131
error: demangling(impl1::bar::<impl impl1::foo::Foo>::baz::h90c4a800b1aa0df0)
32-
--> $DIR/impl1.rs:32:9
32+
--> $DIR/impl1.rs:34:9
3333
|
3434
LL | #[rustc_symbol_name]
3535
| ^^^^^^^^^^^^^^^^^^^^
3636

3737
error: demangling-alt(impl1::bar::<impl impl1::foo::Foo>::baz)
38-
--> $DIR/impl1.rs:32:9
38+
--> $DIR/impl1.rs:34:9
3939
|
4040
LL | #[rustc_symbol_name]
4141
| ^^^^^^^^^^^^^^^^^^^^
4242

4343
error: def-path(bar::<impl foo::Foo>::baz)
44-
--> $DIR/impl1.rs:39:9
44+
--> $DIR/impl1.rs:41:9
4545
|
4646
LL | #[rustc_def_path]
4747
| ^^^^^^^^^^^^^^^^^
4848

49-
error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17h62e540f14f879d56E)
50-
--> $DIR/impl1.rs:62:13
49+
error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$3$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17SYMBOL_HASHE)
50+
--> $DIR/impl1.rs:64:13
5151
|
5252
LL | #[rustc_symbol_name]
5353
| ^^^^^^^^^^^^^^^^^^^^
5454

55-
error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::h62e540f14f879d56)
56-
--> $DIR/impl1.rs:62:13
55+
error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::SYMBOL_HASH)
56+
--> $DIR/impl1.rs:64:13
5757
|
5858
LL | #[rustc_symbol_name]
5959
| ^^^^^^^^^^^^^^^^^^^^
6060

6161
error: demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method)
62-
--> $DIR/impl1.rs:62:13
62+
--> $DIR/impl1.rs:64:13
6363
|
6464
LL | #[rustc_symbol_name]
6565
| ^^^^^^^^^^^^^^^^^^^^
6666

6767
error: def-path(<[&dyn Foo<Assoc = for<'r> extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method)
68-
--> $DIR/impl1.rs:69:13
68+
--> $DIR/impl1.rs:71:13
6969
|
7070
LL | #[rustc_def_path]
7171
| ^^^^^^^^^^^^^^^^^

src/test/ui/symbol-names/impl1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// revisions: legacy v0
44
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
55
//[v0]compile-flags: -Z symbol-mangling-version=v0
6+
//[legacy]normalize-stderr-32-bit: "hdb62078998ce7ea8" -> "SYMBOL_HASH"
7+
//[legacy]normalize-stderr-64bit: "h62e540f14f879d56" -> "SYMBOL_HASH"
68

79
#![feature(optin_builtin_traits, rustc_attrs)]
810
#![allow(dead_code)]

src/test/ui/symbol-names/impl1.v0.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
error: symbol-name(_RNvMNtCs4fqI2P2rA04_5impl13fooNtB2_3Foo3bar)
2-
--> $DIR/impl1.rs:14:9
2+
--> $DIR/impl1.rs:16:9
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

77
error: demangling(<impl1[317d481089b8c8fe]::foo::Foo>::bar)
8-
--> $DIR/impl1.rs:14:9
8+
--> $DIR/impl1.rs:16:9
99
|
1010
LL | #[rustc_symbol_name]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
error: demangling-alt(<impl1::foo::Foo>::bar)
14-
--> $DIR/impl1.rs:14:9
14+
--> $DIR/impl1.rs:16:9
1515
|
1616
LL | #[rustc_symbol_name]
1717
| ^^^^^^^^^^^^^^^^^^^^
1818

1919
error: def-path(foo::Foo::bar)
20-
--> $DIR/impl1.rs:21:9
20+
--> $DIR/impl1.rs:23:9
2121
|
2222
LL | #[rustc_def_path]
2323
| ^^^^^^^^^^^^^^^^^
2424

2525
error: symbol-name(_RNvMNtCs4fqI2P2rA04_5impl13barNtNtB4_3foo3Foo3baz)
26-
--> $DIR/impl1.rs:32:9
26+
--> $DIR/impl1.rs:34:9
2727
|
2828
LL | #[rustc_symbol_name]
2929
| ^^^^^^^^^^^^^^^^^^^^
3030

3131
error: demangling(<impl1[317d481089b8c8fe]::foo::Foo>::baz)
32-
--> $DIR/impl1.rs:32:9
32+
--> $DIR/impl1.rs:34:9
3333
|
3434
LL | #[rustc_symbol_name]
3535
| ^^^^^^^^^^^^^^^^^^^^
3636

3737
error: demangling-alt(<impl1::foo::Foo>::baz)
38-
--> $DIR/impl1.rs:32:9
38+
--> $DIR/impl1.rs:34:9
3939
|
4040
LL | #[rustc_symbol_name]
4141
| ^^^^^^^^^^^^^^^^^^^^
4242

4343
error: def-path(bar::<impl foo::Foo>::baz)
44-
--> $DIR/impl1.rs:39:9
44+
--> $DIR/impl1.rs:41:9
4545
|
4646
LL | #[rustc_def_path]
4747
| ^^^^^^^^^^^^^^^^^
4848

4949
error: symbol-name(_RNvXNCNvCs4fqI2P2rA04_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method)
50-
--> $DIR/impl1.rs:62:13
50+
--> $DIR/impl1.rs:64:13
5151
|
5252
LL | #[rustc_symbol_name]
5353
| ^^^^^^^^^^^^^^^^^^^^
5454

5555
error: demangling(<[&dyn impl1[317d481089b8c8fe]::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1[317d481089b8c8fe]::AutoTrait; 3: usize] as impl1[317d481089b8c8fe]::main::{closure#1}::Bar>::method)
56-
--> $DIR/impl1.rs:62:13
56+
--> $DIR/impl1.rs:64:13
5757
|
5858
LL | #[rustc_symbol_name]
5959
| ^^^^^^^^^^^^^^^^^^^^
6060

6161
error: demangling-alt(<[&dyn impl1::Foo<Assoc = for<'a> extern "C" fn(&'a u8, ...)> + impl1::AutoTrait; 3] as impl1::main::{closure#1}::Bar>::method)
62-
--> $DIR/impl1.rs:62:13
62+
--> $DIR/impl1.rs:64:13
6363
|
6464
LL | #[rustc_symbol_name]
6565
| ^^^^^^^^^^^^^^^^^^^^
6666

6767
error: def-path(<[&dyn Foo<Assoc = for<'r> extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method)
68-
--> $DIR/impl1.rs:69:13
68+
--> $DIR/impl1.rs:71:13
6969
|
7070
LL | #[rustc_def_path]
7171
| ^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)