summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5153.rs
blob: 5bf0579030ad01a341ba7e1596741e2600ec2679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 reference `&dyn Foo` in the current scope
}