summary refs log tree commit diff
path: root/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
blob: b866dab9dba2816100d5047d3f2c0b41eec673d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//~ 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 the trait `SuperTrait` is not dyn compatible
}

fn main() {}