diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5153.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5153.rs b/src/test/ui/issues/issue-5153.rs new file mode 100644 index 000000000..5bf057903 --- /dev/null +++ b/src/test/ui/issues/issue-5153.rs @@ -0,0 +1,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 +} |