rust/tests/ui/suggestions/object-unsafe-trait-references-self.rs

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

13 lines
280 B
Rust
Raw Normal View History

2020-01-31 21:04:58 -06:00
trait Trait {
fn baz(&self, _: Self) {}
fn bat(&self) -> Self {}
}
fn bar(x: &dyn Trait) {} //~ ERROR the trait `Trait` cannot be made into an object
trait Other: Sized {}
fn foo(x: &dyn Other) {} //~ ERROR the trait `Other` cannot be made into an object
fn main() {}