2021-05-15 19:19:01 +00:00
|
|
|
// Ensure that trait objects don't include more than one binder. See #83611
|
|
|
|
|
|
|
|
// build-fail
|
2021-05-16 03:18:59 +00:00
|
|
|
// revisions: v0
|
2021-10-21 12:57:14 +00:00
|
|
|
//[v0]compile-flags: -C symbol-mangling-version=v0
|
2021-05-16 03:18:59 +00:00
|
|
|
//[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]"
|
2021-05-15 19:19:01 +00:00
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
trait Bar {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Bar for &dyn FnMut(&u8) {
|
|
|
|
#[rustc_symbol_name]
|
2021-05-16 03:18:59 +00:00
|
|
|
//[v0]~^ ERROR symbol-name
|
2021-05-15 19:19:01 +00:00
|
|
|
//[v0]~| ERROR demangling
|
|
|
|
//[v0]~| ERROR demangling-alt
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for &(dyn FnMut(&u8) + for<'b> Send) {
|
|
|
|
#[rustc_symbol_name]
|
2021-05-16 03:18:59 +00:00
|
|
|
//[v0]~^ ERROR symbol-name
|
2021-05-15 19:19:01 +00:00
|
|
|
//[v0]~| ERROR demangling
|
|
|
|
//[v0]~| ERROR demangling-alt
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Baz {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Baz for &(dyn for<'b> Send + FnMut(&u8)) {
|
|
|
|
#[rustc_symbol_name]
|
2021-05-16 03:18:59 +00:00
|
|
|
//[v0]~^ ERROR symbol-name
|
2021-05-15 19:19:01 +00:00
|
|
|
//[v0]~| ERROR demangling
|
|
|
|
//[v0]~| ERROR demangling-alt
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|