]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-generic-type-arg.rs
1 trait Foo {
2     type F<'a>;
3
4     fn identity<'a>(t: &'a Self::F<'a>) -> &'a Self::F<'a> { t }
5 }
6
7 impl <T, T1> Foo for T {
8     //~^ ERROR: the type parameter `T1` is not constrained
9     type F<T1> = &[u8];
10       //~^ ERROR: the name `T1` is already used for
11       //~| ERROR: `&` without an explicit lifetime name cannot be used here
12 }
13
14 fn main() {}