summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-85921.rs
blob: df59f497d7841128f065c7446e51a178c3a39363 (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 with_assoc(f: impl FnOnce(Self::Assoc<'_>));
}

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

    fn with_assoc(f: impl FnOnce(Self::Assoc<'_>)) {
        f(5i32)
    }
}

fn main() {}