rust/tests/ui/issues/issue-5153.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
238 B
Rust
Raw Normal View History

2013-09-26 07:29:43 +00:00
trait Foo {
fn foo(self: Box<Self>);
2013-09-26 07:29:43 +00:00
}
impl Foo for isize {
fn foo(self: Box<isize>) { }
2013-09-26 07:29:43 +00:00
}
fn main() {
2019-05-28 18:46:13 +00:00
(&5isize as &dyn Foo).foo();
//~^ ERROR: no method named `foo` found for reference `&dyn Foo` in the current scope
2013-09-26 07:29:43 +00:00
}