summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-88459.rs
blob: 3b26a180152cb0761c02a88f243d73856ab41b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// check-pass

#![feature(generic_associated_types)]

trait Trait {
    type Assoc<'a>;
}

fn f<T: Trait>(_: T, _: impl Fn(T::Assoc<'_>)) {}

struct Type;

impl Trait for Type {
    type Assoc<'a> = ();
}

fn main() {
    f(Type, |_|());
}