Skip to content

Commit 3a4fe97

Browse files
committed
Add a regression test for issue-65581
1 parent ebc1f89 commit 3a4fe97

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// check-pass
2+
3+
#![allow(dead_code)]
4+
5+
trait Trait1<T, U> {
6+
fn f1(self) -> U;
7+
}
8+
9+
trait Trait2 {
10+
type T;
11+
type U: Trait2<T = Self::T>;
12+
fn f2(f: impl FnOnce(&Self::U));
13+
}
14+
15+
fn f3<T: Trait2>() -> impl Trait1<T, T::T> {
16+
Struct1
17+
}
18+
19+
struct Struct1;
20+
21+
impl<T: Trait2> Trait1<T, T::T> for Struct1 {
22+
fn f1(self) -> T::T {
23+
unimplemented!()
24+
}
25+
}
26+
27+
fn f4<T: Trait2>() {
28+
T::f2(|_| {
29+
f3::<T::U>().f1();
30+
});
31+
}
32+
33+
fn main() {}

0 commit comments

Comments
 (0)