Skip to content

Commit

Permalink
Add a regression test for rust-lang#85921
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 17, 2021
1 parent 4e89811 commit 6bcf0e4
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 6bcf0e4

Please sign in to comment.