summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/parameter_number_and_kind.rs
blob: 0508cc2daeae0fb3328d42c5052f5ad027cf8bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(generic_associated_types)]
#![feature(associated_type_defaults)]

trait Foo {
    type A<'a>;
    type B<'a, 'b>;
    type C;
    type D<T>;
    type E<'a, T>;
    // Test parameters in default values
    type FOk<T> = Self::E<'static, T>;
    type FErr1 = Self::E<'static, 'static>;
    //~^ ERROR this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
    //~| ERROR this associated type takes 1
    type FErr2<T> = Self::E<'static, T, u32>;
    //~^ ERROR this associated type takes 1
}

fn main() {}