1 error[E0311]: the parameter type `Self` may not live long enough
3 = help: consider adding an explicit lifetime bound `Self: 'a`...
4 = note: ...so that the type `Self` will meet its required lifetime bounds...
5 note: ...that is required by this bound
6 --> $DIR/object-safety-supertrait-mentions-GAT.rs:6:15
11 error: associated item referring to unboxed trait object for its own trait
12 --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
14 LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
15 | ---------- in this trait
16 LL | fn c(&self) -> dyn SuperTrait<T>;
19 help: you might have meant to use `Self` to refer to the implementing type
21 LL | fn c(&self) -> Self;
24 error[E0038]: the trait `SuperTrait` cannot be made into an object
25 --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
27 LL | fn c(&self) -> dyn SuperTrait<T>;
28 | ^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object
30 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>
31 --> $DIR/object-safety-supertrait-mentions-GAT.rs:4:10
34 | ^^^ ...because it contains the generic associated type `Gat`
36 LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
37 | ---------- this trait cannot be made into an object...
38 = help: consider moving `Gat` to another trait
40 error: aborting due to 3 previous errors
42 Some errors have detailed explanations: E0038, E0311.
43 For more information about an error, try `rustc --explain E0038`.