mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
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:
commit
1ee7c2940e
19
src/test/ui/generic-associated-types/issue-85921.rs
Normal file
19
src/test/ui/generic-associated-types/issue-85921.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user