]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/object-unsafe-trait-references-self.rs
Rollup merge of #107127 - uweigand:s390x-sanitizer, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / object-unsafe-trait-references-self.rs
1 trait Trait {
2     fn baz(&self, _: Self) {}
3     fn bat(&self) -> Self {}
4 }
5
6 fn bar(x: &dyn Trait) {} //~ ERROR the trait `Trait` cannot be made into an object
7
8 trait Other: Sized {}
9
10 fn foo(x: &dyn Other) {} //~ ERROR the trait `Other` cannot be made into an object
11
12 fn main() {}