Skip to content

Commit 75f06ce

Browse files
committed
Handle TyAlias in projected_ty
1 parent 789dfd2 commit 75f06ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/hir-ty/src/mir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl<V, T> ProjectionElem<V, T> {
151151
TyKind::Adt(_, subst) => {
152152
db.field_types(f.parent)[f.local_id].clone().substitute(Interner, subst)
153153
}
154+
TyKind::Alias(al) => al.clone().intern(Interner),
154155
_ => {
155156
never!("Only adt has field");
156157
return TyKind::Error.intern(Interner);
@@ -167,6 +168,7 @@ impl<V, T> ProjectionElem<V, T> {
167168
TyKind::Error.intern(Interner)
168169
}),
169170
TyKind::Closure(id, subst) => closure_field(*id, subst, *f),
171+
TyKind::Alias(al) => al.clone().intern(Interner),
170172
_ => {
171173
never!("Only tuple or closure has tuple or closure field");
172174
return TyKind::Error.intern(Interner);

0 commit comments

Comments
 (0)