summary refs log tree commit diff
path: root/src/test/ui/issues/issue-5153.rs
blob: 551880ae009fb3f762b0aadec7097bfda1cd3787 (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 &Foo).foo();
    //~^ ERROR: no method named `foo` found for type `&dyn Foo` in the current scope
}