blob: af35d1e0359db04c5c329636600d273c9e68982f [file] [log] [blame]
// Regression test for <https://github.com/rust-lang/rust/issues/141419>.
use std::ops::Deref;
struct W;
trait Foo: Deref<Target = W> {
fn method(self: &W) {}
//~^ ERROR invalid `self` parameter type: `&W`
}
fn test(x: &dyn Foo) {
//~^ ERROR the trait `Foo` is not dyn compatible
x.method();
//~^ ERROR the trait `Foo` is not dyn compatible
}
fn main() {}