]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-87748.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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 #![feature(generic_associated_types)]
7
8 trait MyTrait {
9     type Assoc<'a, 'b> where 'b: 'a;
10     fn do_sth(arg: Self::Assoc<'_, '_>);
11     fn do_sth2(arg: Self::Assoc<'_, '_>) {}
12 }
13
14 struct Foo;
15
16 impl MyTrait for Foo {
17     type Assoc<'a, 'b> = u32 where 'b: 'a;
18
19     fn do_sth(_: u32) {}
20     fn do_sth2(_: Self::Assoc<'static, 'static>) {}
21 }
22
23 fn main() {}