summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/object-unsafe-trait-references-self.rs
blob: 07bf053e996658196f5c9bb3258b82d3219b0812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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() {}