diff options
Diffstat (limited to 'tests/ui/generic-associated-types/issue-85921.rs')
-rw-r--r-- | tests/ui/generic-associated-types/issue-85921.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-85921.rs b/tests/ui/generic-associated-types/issue-85921.rs new file mode 100644 index 000000000..d281ed9ee --- /dev/null +++ b/tests/ui/generic-associated-types/issue-85921.rs @@ -0,0 +1,17 @@ +// 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() {} |