]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/object-unsafe-trait-should-use-self.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / object-unsafe-trait-should-use-self.rs
1 #![allow(bare_trait_objects)]
2 trait A: Sized {
3     fn f(a: A) -> A;
4     //~^ ERROR associated item referring to unboxed trait object for its own trait
5     //~| ERROR the trait `A` cannot be made into an object
6 }
7 trait B {
8     fn f(a: B) -> B;
9     //~^ ERROR associated item referring to unboxed trait object for its own trait
10     //~| ERROR the trait `B` cannot be made into an object
11 }
12 trait C {
13     fn f(&self, a: C) -> C;
14 }
15
16 fn main() {}