rust/src/test/ui/error-codes/E0038.rs

12 lines
132 B
Rust
Raw Normal View History

2016-05-19 07:00:43 -05:00
trait Trait {
fn foo(&self) -> Self;
}
2016-08-08 17:54:16 -05:00
fn call_foo(x: Box<Trait>) {
//~^ ERROR E0038
2016-05-19 07:00:43 -05:00
let y = x.foo();
}
fn main() {
}