]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-87748.rs
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / issue-87748.rs
1 // Checks that we properly add implied bounds from unnormalized projections in
2 // inputs when typechecking functions.
3
4 // check-pass
5
6 trait MyTrait {
7     type Assoc<'a, 'b> where 'b: 'a;
8     fn do_sth(arg: Self::Assoc<'_, '_>);
9     fn do_sth2(arg: Self::Assoc<'_, '_>) {}
10 }
11
12 struct Foo;
13
14 impl MyTrait for Foo {
15     type Assoc<'a, 'b> = u32 where 'b: 'a;
16
17     fn do_sth(_: u32) {}
18     fn do_sth2(_: Self::Assoc<'static, 'static>) {}
19 }
20
21 fn main() {}