Rollup merge of #89975 - JohnTitor:gats-tests-85921, r=jackh726

Add a regression test for #85921

Closes #85921
r? `@jackh726`
This commit is contained in:
Matthias Krüger 2021-10-17 18:18:59 +02:00 committed by GitHub
commit 1ee7c2940e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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() {}