1 error: associated item referring to unboxed trait object for its own trait
2 --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
9 help: you might have meant to use `Self` to refer to the implementing type
11 LL | fn f(a: Self) -> Self;
14 error[E0038]: the trait `A` cannot be made into an object
15 --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
18 | ^ `A` cannot be made into an object
20 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
21 --> $DIR/object-unsafe-trait-should-use-self.rs:2:10
24 | - ^^^^^ ...because it requires `Self: Sized`
26 | this trait cannot be made into an object...
28 error: associated item referring to unboxed trait object for its own trait
29 --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
36 help: you might have meant to use `Self` to refer to the implementing type
38 LL | fn f(a: Self) -> Self;
41 error[E0038]: the trait `B` cannot be made into an object
42 --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
45 | ^ `B` cannot be made into an object
47 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
48 --> $DIR/object-unsafe-trait-should-use-self.rs:8:8
51 | - this trait cannot be made into an object...
53 | ^ ...because associated function `f` has no `self` parameter
54 help: consider turning `f` into a method by giving it a `&self` argument
56 LL | fn f(&self, a: B) -> B;
58 help: alternatively, consider constraining `f` so it does not apply to trait objects
60 LL | fn f(a: B) -> B where Self: Sized;
63 error: aborting due to 4 previous errors
65 For more information about this error, try `rustc --explain E0038`.