Add a regression test for #85921

This commit is contained in:
Yuki Okushi 2021-10-17 16:09:49 +09:00
parent 4e89811b46
commit 6bcf0e471b
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,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() {}