Skip to content

Commit 6a48e6e

Browse files
committed
[AVR] Fix the symbol-names test properly
1 parent 7ce71a6 commit 6a48e6e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ error: def-path(bar::<impl foo::Foo>::baz)
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$6method17hefcb557fc1aaf107E)
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)
5050
--> $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::hefcb557fc1aaf107)
55+
error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; 3] as impl1::main::{{closure}}::Bar>::method::SYMBOL_HASH)
5656
--> $DIR/impl1.rs:64:13
5757
|
5858
LL | #[rustc_symbol_name]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
55
//[v0]compile-flags: -Z symbol-mangling-version=v0
66
//[legacy]normalize-stderr-32bit: "hdb62078998ce7ea8" -> "SYMBOL_HASH"
7-
//[legacy]normalize-stderr-64bit: "h62e540f14f879d56" -> "SYMBOL_HASH"
7+
//[legacy]normalize-stderr-64bit: "hefcb557fc1aaf107" -> "SYMBOL_HASH"
88

99
#![feature(optin_builtin_traits, rustc_attrs)]
1010
#![allow(dead_code)]

src/tools/compiletest/src/header/tests.rs

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ fn test_parse_normalization_string() {
2727
let first = parse_normalization_string(&mut s);
2828
assert_eq!(first, Some("something (32 bits)".to_owned()));
2929
assert_eq!(s, " -> \"something ($WORD bits).");
30+
31+
// Nothing to normalize (No quotes, 16-bit)
32+
let mut s = "normalize-stderr-16bit: something (16 bits) -> something ($WORD bits).";
33+
let first = parse_normalization_string(&mut s);
34+
assert_eq!(first, None);
35+
assert_eq!(s, r#"normalize-stderr-16bit: something (16 bits) -> something ($WORD bits)."#);
3036
}
3137

3238
fn config() -> Config {

0 commit comments

Comments
 (0)