Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/hir-ty/src/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl<V, T> ProjectionElem<V, T> {
TyKind::Adt(_, subst) => {
db.field_types(f.parent)[f.local_id].clone().substitute(Interner, subst)
}
TyKind::Alias(al) => al.clone().intern(Interner),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TyKind::Alias(al) => al.clone().intern(Interner),
TyKind::Alias(inner) => al.clone().intern(Interner),

_ => {
never!("Only adt has field");
return TyKind::Error.intern(Interner);
Expand All @@ -167,6 +168,7 @@ impl<V, T> ProjectionElem<V, T> {
TyKind::Error.intern(Interner)
}),
TyKind::Closure(id, subst) => closure_field(*id, subst, *f),
TyKind::Alias(al) => al.clone().intern(Interner),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TyKind::Alias(al) => al.clone().intern(Interner),
TyKind::Alias(inner) => al.clone().intern(Interner),

_ => {
never!("Only tuple or closure has tuple or closure field");
return TyKind::Error.intern(Interner);
Expand Down