mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 08:18:44 +00:00
13 lines
238 B
Rust
13 lines
238 B
Rust
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
|
|
}
|