summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs
blob: dbf7e02aeafccdb3d34859afab4397f225dd451e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(generic_associated_types)]

trait Foo {
    type F<'a>;

    fn identity<'a>(t: &'a Self::F<'a>) -> &'a Self::F<'a> { t }
}

impl <T, T1> Foo for T {
    //~^ ERROR: the type parameter `T1` is not constrained
    type F<T1> = &[u8];
      //~^ ERROR: the name `T1` is already used for
      //~| ERROR: `&` without an explicit lifetime name cannot be used here
}

fn main() {}