summary refs log tree commit diff
path: root/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
blob: 9e5c1bfe4160af58daa4fa49ffd2c102a0b99c11 (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` is not dyn compatible
}

fn main() {}