]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/parameter_number_and_kind.rs
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
[rust.git] / src / test / ui / generic-associated-types / parameter_number_and_kind.rs
1 #![allow(incomplete_features)]
2 #![feature(generic_associated_types)]
3 #![feature(associated_type_defaults)]
4
5 trait Foo {
6     type A<'a>;
7     type B<'a, 'b>;
8     type C;
9     type D<T>;
10     type E<'a, T>;
11     // Test parameters in default values
12     type FOk<T> = Self::E<'static, T>;
13     type FErr1 = Self::E<'static, 'static>;
14     //~^ ERROR this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
15     //~| ERROR this associated type takes 1 type argument but 0 type arguments were supplied
16     type FErr2<T> = Self::E<'static, T, u32>;
17     //~^ ERROR this associated type takes 1 type argument but 2 type arguments were supplied
18 }
19
20 fn main() {}