rust/src/test/ui/issues/issue-5153.rs
2019-05-29 00:57:31 -04:00

13 lines
233 B
Rust

trait Foo {
fn foo(self: Box<Self>);
}
impl Foo for isize {
fn foo(self: Box<isize>) { }
}
fn main() {
(&5isize as &dyn Foo).foo();
//~^ ERROR: no method named `foo` found for type `&dyn Foo` in the current scope
}