rust/tests/ui/generic-associated-types/issue-85921.rs

18 lines
244 B
Rust

//@ check-pass
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() {}