summaryrefslogtreecommitdiffstats
path: root/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs
blob: 14e00d2ef321d231c5c5385f1fbde93a25c3bb1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//~ ERROR the parameter type `Self` may not live long enough

trait GatTrait {
    type Gat<'a>
    where
        Self: 'a;
}

trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
    fn c(&self) -> dyn SuperTrait<T>;
    //~^ ERROR associated item referring to unboxed trait object for its own trait
    //~| ERROR the trait `SuperTrait` cannot be made into an object
}

fn main() {}