Skip to content

Commit d2cfc47

Browse files
committed
add test for alias self_ty
1 parent e2ac9d9 commit d2cfc47

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/ui/traits/next-solver/normalization-shadowing/use_object_if_empty_env.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,21 @@ where
1616
x
1717
}
1818

19+
trait Id<'a> {
20+
type This: ?Sized;
21+
}
22+
impl<T: ?Sized> Id<'_> for T {
23+
type This = T;
24+
}
25+
26+
// Ensure that we properly normalize alias self_ty before evaluating the goal.
27+
fn alias_foo<T>(x: for<'a> fn(
28+
<<dyn Trait<Assoc = T> as Id<'a>>::This as Trait>::Assoc
29+
)) -> fn(T)
30+
where
31+
dyn Trait<Assoc = T>: Trait,
32+
{
33+
x
34+
}
35+
1936
fn main() {}

0 commit comments

Comments
 (0)