mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-03 01:38:18 +00:00
add test for alias self_ty
This commit is contained in:
parent
e2ac9d92d9
commit
d2cfc47ed0
@ -16,4 +16,21 @@ where
|
||||
x
|
||||
}
|
||||
|
||||
trait Id<'a> {
|
||||
type This: ?Sized;
|
||||
}
|
||||
impl<T: ?Sized> Id<'_> for T {
|
||||
type This = T;
|
||||
}
|
||||
|
||||
// Ensure that we properly normalize alias self_ty before evaluating the goal.
|
||||
fn alias_foo<T>(x: for<'a> fn(
|
||||
<<dyn Trait<Assoc = T> as Id<'a>>::This as Trait>::Assoc
|
||||
)) -> fn(T)
|
||||
where
|
||||
dyn Trait<Assoc = T>: Trait,
|
||||
{
|
||||
x
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user