From 83459081bacfe30a593fc3cc95c029b11ed67468 Mon Sep 17 00:00:00 2001 From: Jack Huey Date: Sat, 15 May 2021 23:18:59 -0400 Subject: [PATCH] Remove legacy for trait object mangling test and replace crate hash --- .../symbol-names/trait-objects.legacy.stderr | 56 ------------------- src/test/ui/symbol-names/trait-objects.rs | 22 +++----- .../ui/symbol-names/trait-objects.v0.stderr | 30 +++++----- 3 files changed, 22 insertions(+), 86 deletions(-) delete mode 100644 src/test/ui/symbol-names/trait-objects.legacy.stderr diff --git a/src/test/ui/symbol-names/trait-objects.legacy.stderr b/src/test/ui/symbol-names/trait-objects.legacy.stderr deleted file mode 100644 index 200280c358f5b..0000000000000 --- a/src/test/ui/symbol-names/trait-objects.legacy.stderr +++ /dev/null @@ -1,56 +0,0 @@ -error: symbol-name(_ZN136_$LT$$RF$dyn$u20$core..ops..function..FnMut$LT$$LP$$RF$u8$C$$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u20$as$u20$trait_objects..Bar$GT$6method17h1e14a5f2d365272fE) - --> $DIR/trait-objects.rs:15:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(<&dyn core::ops::function::FnMut<(&u8,)>+Output = () as trait_objects::Bar>::method::h1e14a5f2d365272f) - --> $DIR/trait-objects.rs:15:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(<&dyn core::ops::function::FnMut<(&u8,)>+Output = () as trait_objects::Bar>::method) - --> $DIR/trait-objects.rs:15:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: symbol-name(_ZN159_$LT$$RF$dyn$u20$core..ops..function..FnMut$LT$$LP$$RF$u8$C$$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$u20$as$u20$trait_objects..Foo$GT$6method17he7a07961c9aaa367E) - --> $DIR/trait-objects.rs:30:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(<&dyn core::ops::function::FnMut<(&u8,)>+Output = ()+core::marker::Send as trait_objects::Foo>::method::he7a07961c9aaa367) - --> $DIR/trait-objects.rs:30:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(<&dyn core::ops::function::FnMut<(&u8,)>+Output = ()+core::marker::Send as trait_objects::Foo>::method) - --> $DIR/trait-objects.rs:30:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: symbol-name(_ZN159_$LT$$RF$dyn$u20$core..ops..function..FnMut$LT$$LP$$RF$u8$C$$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$u20$as$u20$trait_objects..Baz$GT$6method17ha53e6f99bf033f0bE) - --> $DIR/trait-objects.rs:45:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling(<&dyn core::ops::function::FnMut<(&u8,)>+Output = ()+core::marker::Send as trait_objects::Baz>::method::ha53e6f99bf033f0b) - --> $DIR/trait-objects.rs:45:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: demangling-alt(<&dyn core::ops::function::FnMut<(&u8,)>+Output = ()+core::marker::Send as trait_objects::Baz>::method) - --> $DIR/trait-objects.rs:45:5 - | -LL | #[rustc_symbol_name] - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 9 previous errors - diff --git a/src/test/ui/symbol-names/trait-objects.rs b/src/test/ui/symbol-names/trait-objects.rs index ffbd3901b8e2a..cea1a89d75746 100644 --- a/src/test/ui/symbol-names/trait-objects.rs +++ b/src/test/ui/symbol-names/trait-objects.rs @@ -1,9 +1,10 @@ // Ensure that trait objects don't include more than one binder. See #83611 // build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z symbol-mangling-version=legacy - //[v0]compile-flags: -Z symbol-mangling-version=v0 +// revisions: v0 +//[v0]compile-flags: -Z symbol-mangling-version=v0 +//[v0]normalize-stderr-test: "Cs.*?_" -> "CRATE_HASH" +//[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" #![feature(rustc_attrs)] @@ -13,10 +14,7 @@ trait Bar { impl Bar for &dyn FnMut(&u8) { #[rustc_symbol_name] - //[legacy]~^ ERROR symbol-name - //[legacy]~| ERROR demangling - //[legacy]~| ERROR demangling-alt - //[v0]~^^^^ ERROR symbol-name + //[v0]~^ ERROR symbol-name //[v0]~| ERROR demangling //[v0]~| ERROR demangling-alt fn method(&self) {} @@ -28,10 +26,7 @@ trait Foo { impl Foo for &(dyn FnMut(&u8) + for<'b> Send) { #[rustc_symbol_name] - //[legacy]~^ ERROR symbol-name - //[legacy]~| ERROR demangling - //[legacy]~| ERROR demangling-alt - //[v0]~^^^^ ERROR symbol-name + //[v0]~^ ERROR symbol-name //[v0]~| ERROR demangling //[v0]~| ERROR demangling-alt fn method(&self) {} @@ -43,10 +38,7 @@ trait Baz { impl Baz for &(dyn for<'b> Send + FnMut(&u8)) { #[rustc_symbol_name] - //[legacy]~^ ERROR symbol-name - //[legacy]~| ERROR demangling - //[legacy]~| ERROR demangling-alt - //[v0]~^^^^ ERROR symbol-name + //[v0]~^ ERROR symbol-name //[v0]~| ERROR demangling //[v0]~| ERROR demangling-alt fn method(&self) {} diff --git a/src/test/ui/symbol-names/trait-objects.v0.stderr b/src/test/ui/symbol-names/trait-objects.v0.stderr index 7a29f44718af9..2b09318f06c74 100644 --- a/src/test/ui/symbol-names/trait-objects.v0.stderr +++ b/src/test/ui/symbol-names/trait-objects.v0.stderr @@ -1,53 +1,53 @@ -error: symbol-name(_RNvXCs21hi0yVfW1J_13trait_objectsRDG_INtNtNtCs54lBhuwykzk_4core3ops8function5FnMutTRL0_hEEp6OutputuEL_NtB2_3Bar6method) - --> $DIR/trait-objects.rs:15:5 +error: symbol-name(_RNvXCRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3ops8function5FnMutTRL0_hEEp6OutputuEL_NtB2_3Bar6method) + --> $DIR/trait-objects.rs:16:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: demangling(<&dyn for<'a> core[3b0e14d6e1ad42d0]::ops::function::FnMut<(&'a u8,), Output = ()> as trait_objects[17891616a171812d]::Bar>::method) - --> $DIR/trait-objects.rs:15:5 +error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> as trait_objects[17891616a171812d]::Bar>::method) + --> $DIR/trait-objects.rs:16:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(<&dyn for<'a> core::ops::function::FnMut<(&'a u8,), Output = ()> as trait_objects::Bar>::method) - --> $DIR/trait-objects.rs:15:5 + --> $DIR/trait-objects.rs:16:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: symbol-name(_RNvXs_Cs21hi0yVfW1J_13trait_objectsRDG_INtNtNtCs54lBhuwykzk_4core3ops8function5FnMutTRL0_hEEp6OutputuNtNtBI_6marker4SendEL_NtB4_3Foo6method) - --> $DIR/trait-objects.rs:30:5 +error: symbol-name(_RNvXs_CRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3ops8function5FnMutTRL0_hEEp6OutputuNtNtBI_6marker4SendEL_NtB4_3Foo6method) + --> $DIR/trait-objects.rs:28:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: demangling(<&dyn for<'a> core[3b0e14d6e1ad42d0]::ops::function::FnMut<(&'a u8,), Output = ()> + core[3b0e14d6e1ad42d0]::marker::Send as trait_objects[17891616a171812d]::Foo>::method) - --> $DIR/trait-objects.rs:30:5 +error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[17891616a171812d]::Foo>::method) + --> $DIR/trait-objects.rs:28:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(<&dyn for<'a> core::ops::function::FnMut<(&'a u8,), Output = ()> + core::marker::Send as trait_objects::Foo>::method) - --> $DIR/trait-objects.rs:30:5 + --> $DIR/trait-objects.rs:28:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: symbol-name(_RNvXs0_Cs21hi0yVfW1J_13trait_objectsRDG_INtNtNtCs54lBhuwykzk_4core3ops8function5FnMutTRL0_hEEp6OutputuNtNtBJ_6marker4SendEL_NtB5_3Baz6method) - --> $DIR/trait-objects.rs:45:5 +error: symbol-name(_RNvXs0_CRATE_HASH13trait_objectsRDG_INtNtNtCRATE_HASH4core3ops8function5FnMutTRL0_hEEp6OutputuNtNtBJ_6marker4SendEL_NtB5_3Baz6method) + --> $DIR/trait-objects.rs:40:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: demangling(<&dyn for<'a> core[3b0e14d6e1ad42d0]::ops::function::FnMut<(&'a u8,), Output = ()> + core[3b0e14d6e1ad42d0]::marker::Send as trait_objects[17891616a171812d]::Baz>::method) - --> $DIR/trait-objects.rs:45:5 +error: demangling(<&dyn for<'a> core[HASH]::ops::function::FnMut<(&'a u8,), Output = ()> + core[HASH]::marker::Send as trait_objects[17891616a171812d]::Baz>::method) + --> $DIR/trait-objects.rs:40:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(<&dyn for<'a> core::ops::function::FnMut<(&'a u8,), Output = ()> + core::marker::Send as trait_objects::Baz>::method) - --> $DIR/trait-objects.rs:45:5 + --> $DIR/trait-objects.rs:40:5 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^