// Regression test for . use std::ops::Deref; struct W; trait Foo: Deref { 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() {}