]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/shadowing.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / generic-associated-types / shadowing.rs
1 trait Shadow<'a> {
2 type Bar<'a>;
3 //~^ ERROR lifetime name `'a` shadows a lifetime name that is already in scope
4 }
5
6 trait NoShadow<'a> {
7 type Bar<'b>; // OK
8 }
9
10 impl<'a> NoShadow<'a> for &'a u32 {
11 type Bar<'a> = i32;
12 //~^ ERROR lifetime name `'a` shadows a lifetime name that is already in scope
13 }
14
15 trait ShadowT<T> {
16 type Bar<T>;
17 //~^ ERROR the name `T` is already used
18 }
19
20 trait NoShadowT<T> {
21 type Bar<U>; // OK
22 }
23
24 impl<T> NoShadowT<T> for Option<T> {
25 type Bar<T> = i32;
26 //~^ ERROR the name `T` is already used
27 }
28
29 fn main() {}