Skip to content

Commit

Permalink
Rollup merge of rust-lang#89975 - JohnTitor:gats-tests-85921, r=jackh726
Browse files Browse the repository at this point in the history
Add a regression test for rust-lang#85921

Closes rust-lang#85921
r? `@jackh726`
  • Loading branch information
matthiaskrgr authored Oct 17, 2021
2 parents e0e2b3c + 6bcf0e4 commit 1ee7c29
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/ui/generic-associated-types/issue-85921.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 1ee7c29

Please sign in to comment.