]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-87429-2.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / issue-87429-2.rs
1 // Derived from `issue-87429`. A test that ensures that using bound vars in the
2 // predicates in the param env when checking that an associated type satisfies
3 // its bounds does not cause us to not be able to use the bounds on the parameters.
4
5 // check-pass
6
7 trait Family {
8     type Member<'a, C: Eq>: for<'b> MyBound<'b, C>;
9 }
10
11 trait MyBound<'a, C> { }
12 impl<'a, C: Eq> MyBound<'a, C> for i32 { }
13
14 impl Family for () {
15     type Member<'a, C: Eq> = i32;
16 }
17
18 fn main() {}