]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-88459.rs
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
[rust.git] / src / test / ui / generic-associated-types / issue-88459.rs
1 // check-pass
2
3 #![feature(generic_associated_types)]
4
5 trait Trait {
6     type Assoc<'a>;
7 }
8
9 fn f<T: Trait>(_: T, _: impl Fn(T::Assoc<'_>)) {}
10
11 struct Type;
12
13 impl Trait for Type {
14     type Assoc<'a> = ();
15 }
16
17 fn main() {
18     f(Type, |_|());
19 }