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 12:00:43 +00:00
trait Trait {
fn foo(&self) -> Self;
}
2019-05-28 18:46:13 +00:00
fn call_foo(x: Box<dyn Trait>) {
2016-08-08 22:54:16 +00:00
//~^ ERROR E0038
2016-05-19 12:00:43 +00:00
let y = x.foo();
}
fn main() {
}