diff --git a/src/test/ui/symbol-names/const-generics-demangling.legacy.stderr b/src/test/ui/symbol-names/const-generics-demangling.legacy.stderr new file mode 100644 index 00000000000..bebbb7aac98 --- /dev/null +++ b/src/test/ui/symbol-names/const-generics-demangling.legacy.stderr @@ -0,0 +1,74 @@ +error: symbol-name(_ZN1c21Unsigned$LT$11_u8$GT$1f17h[HASH]E) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(c::Unsigned<11_u8>::f::h[HASH]) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(c::Unsigned<11_u8>::f) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_ZN1c22Signed$LT$.152_i16$GT$1f17h[HASH]E) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(c::Signed<.152_i16>::f::h[HASH]) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(c::Signed<.152_i16>::f) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_ZN1c13Bool$LT$_$GT$1f17h[HASH]E) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(c::Bool<_>::f::h[HASH]) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(c::Bool<_>::f) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_ZN1c13Char$LT$_$GT$1f17h[HASH]E) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(c::Char<_>::f::h[HASH]) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(c::Char<_>::f) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 12 previous errors + diff --git a/src/test/ui/symbol-names/const-generics-demangling.rs b/src/test/ui/symbol-names/const-generics-demangling.rs index 5c40c391a9e..4a04eca67fd 100644 --- a/src/test/ui/symbol-names/const-generics-demangling.rs +++ b/src/test/ui/symbol-names/const-generics-demangling.rs @@ -1,38 +1,62 @@ // build-fail -// compile-flags: -C symbol-mangling-version=v0 --crate-name=c -// normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" +// revisions: legacy v0 +// compile-flags: --crate-name=c +//[legacy]compile-flags: -C symbol-mangling-version=legacy -Z unstable-options +// [v0]compile-flags: -C symbol-mangling-version=v0 +//[legacy]normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" +// [v0]normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" #![feature(rustc_attrs)] pub struct Unsigned; -#[rustc_symbol_name] -//~^ ERROR symbol-name(_RMCs -//~| ERROR demangling(>) -impl Unsigned<11> {} +impl Unsigned<11> { + #[rustc_symbol_name] + //[v0]~^ ERROR symbol-name(_RNvMCs + //[v0]~| ERROR demangling(>::f) + //[legacy]~^^^^ ERROR symbol-name(_ZN1c21Unsigned$LT$11_u8$GT$ + //[legacy]~| ERROR demangling(c::Unsigned<11_u8>::f:: + //[legacy]~| ERROR demangling-alt(c::Unsigned<11_u8>::f) + fn f() {} +} pub struct Signed; -#[rustc_symbol_name] -//~^ ERROR symbol-name(_RMs_Cs -//~| ERROR demangling(>) -impl Signed<-152> {} +impl Signed<-152> { + #[rustc_symbol_name] + //[v0]~^ ERROR symbol-name(_RNvMs_Cs + //[v0]~| ERROR demangling(>::f) + //[legacy]~^^^^ ERROR symbol-name(_ZN1c22Signed$LT$.152_i16$GT$ + //[legacy]~| ERROR demangling(c::Signed<.152_i16>::f:: + //[legacy]~| ERROR demangling-alt(c::Signed<.152_i16>::f) + fn f() {} +} pub struct Bool; -#[rustc_symbol_name] -//~^ ERROR symbol-name(_RMs0_Cs -//~| ERROR demangling(>) -impl Bool {} +impl Bool { + #[rustc_symbol_name] + //[v0]~^ ERROR symbol-name(_RNvMs0_Cs + //[v0]~| ERROR demangling(>::f) + //[legacy]~^^^^ ERROR symbol-name(_ZN1c13Bool$LT$_$GT$ + //[legacy]~| ERROR demangling(c::Bool<_>::f:: + //[legacy]~| ERROR demangling-alt(c::Bool<_>::f) + fn f() {} +} pub struct Char; -#[rustc_symbol_name] -//~^ ERROR symbol-name(_RMs1_Cs -//~| ERROR demangling(>) -impl Char<'∂'> {} +impl Char<'∂'> { + #[rustc_symbol_name] + //[v0]~^ ERROR symbol-name(_RNvMs1_Cs + //[v0]~| ERROR demangling(>::f) + //[legacy]~^^^^ ERROR symbol-name(_ZN1c13Char$LT$_$GT$ + //[legacy]~| ERROR demangling(c::Char<_>::f:: + //[legacy]~| ERROR demangling-alt(c::Char<_>::f) + fn f() {} +} fn main() {} diff --git a/src/test/ui/symbol-names/const-generics-demangling.stderr b/src/test/ui/symbol-names/const-generics-demangling.stderr deleted file mode 100644 index 8aa08b8a22c..00000000000 --- a/src/test/ui/symbol-names/const-generics-demangling.stderr +++ /dev/null @@ -1,74 +0,0 @@ -error: symbol-name(_RMCsCRATE_HASH_1cINtB_8UnsignedKhb_E) - --> $DIR/const-generics-demangling.rs:8:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(>) - --> $DIR/const-generics-demangling.rs:8:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:8:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: symbol-name(_RMs_CsCRATE_HASH_1cINtB_6SignedKsn98_E) - --> $DIR/const-generics-demangling.rs:16:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(>) - --> $DIR/const-generics-demangling.rs:16:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:16:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: symbol-name(_RMs0_CsCRATE_HASH_1cINtB_4BoolKb1_E) - --> $DIR/const-generics-demangling.rs:24:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(>) - --> $DIR/const-generics-demangling.rs:24:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:24:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: symbol-name(_RMs1_CsCRATE_HASH_1cINtB_4CharKc2202_E) - --> $DIR/const-generics-demangling.rs:32:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(>) - --> $DIR/const-generics-demangling.rs:32:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(>) - --> $DIR/const-generics-demangling.rs:32:1 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 12 previous errors - diff --git a/src/test/ui/symbol-names/const-generics-demangling.v0.stderr b/src/test/ui/symbol-names/const-generics-demangling.v0.stderr new file mode 100644 index 00000000000..7238a849332 --- /dev/null +++ b/src/test/ui/symbol-names/const-generics-demangling.v0.stderr @@ -0,0 +1,74 @@ +error: symbol-name(_RNvMCsCRATE_HASH_1cINtB_8UnsignedKhb_E1f) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(>::f) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(>::f) + --> $DIR/const-generics-demangling.rs:13:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_RNvMs_CsCRATE_HASH_1cINtB_6SignedKsn98_E1f) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(>::f) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(>::f) + --> $DIR/const-generics-demangling.rs:26:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_RNvMs0_CsCRATE_HASH_1cINtB_4BoolKb1_E1f) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(>::f) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(>::f) + --> $DIR/const-generics-demangling.rs:39:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: symbol-name(_RNvMs1_CsCRATE_HASH_1cINtB_4CharKc2202_E1f) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling(>::f) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: demangling-alt(>::f) + --> $DIR/const-generics-demangling.rs:52:5 + | +LL | #[rustc_symbol_name] + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 12 previous errors +