2013-09-26 02:29:43 -05:00
|
|
|
trait Foo {
|
2014-07-08 01:19:35 -05:00
|
|
|
fn foo(self: Box<Self>);
|
2013-09-26 02:29:43 -05:00
|
|
|
}
|
|
|
|
|
2015-01-08 04:54:35 -06:00
|
|
|
impl Foo for isize {
|
|
|
|
fn foo(self: Box<isize>) { }
|
2013-09-26 02:29:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 13:46:13 -05:00
|
|
|
(&5isize as &dyn Foo).foo();
|
2020-01-08 10:05:31 -06:00
|
|
|
//~^ ERROR: no method named `foo` found for reference `&dyn Foo` in the current scope
|
2013-09-26 02:29:43 -05:00
|
|
|
}
|