rust/src/test/ui/error-codes/E0038.rs
2018-12-25 21:08:33 -07:00

12 lines
132 B
Rust

trait Trait {
fn foo(&self) -> Self;
}
fn call_foo(x: Box<Trait>) {
//~^ ERROR E0038
let y = x.foo();
}
fn main() {
}