]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-85921.rs
Rollup merge of #101741 - andrewpollack:add-needs-unwind-ui-tests, r=tmandry
[rust.git] / src / test / ui / generic-associated-types / issue-85921.rs
1 // check-pass
2
3 trait Trait {
4     type Assoc<'a>;
5
6     fn with_assoc(f: impl FnOnce(Self::Assoc<'_>));
7 }
8
9 impl Trait for () {
10     type Assoc<'a> = i32;
11
12     fn with_assoc(f: impl FnOnce(Self::Assoc<'_>)) {
13         f(5i32)
14     }
15 }
16
17 fn main() {}