rust/tests/ui/error-codes/E0038.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
136 B
Rust
Raw Normal View History

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