]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-safety/object-safety-supertrait-mentions-GAT.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / object-safety / object-safety-supertrait-mentions-GAT.rs
1 //~ ERROR the parameter type `Self` may not live long enough
2
3 trait GatTrait {
4     type Gat<'a>
5     where
6         Self: 'a;
7 }
8
9 trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
10     fn c(&self) -> dyn SuperTrait<T>;
11     //~^ ERROR associated item referring to unboxed trait object for its own trait
12     //~| ERROR the trait `SuperTrait` cannot be made into an object
13 }
14
15 fn main() {}