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

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

14 lines
178 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();
//~^ ERROR E0038
//~| ERROR E0277
2016-05-19 12:00:43 +00:00
}
fn main() {
}