1
Fork 0

Combine projection and opaque into alias

This commit is contained in:
Michael Goulet 2022-11-26 21:51:55 +00:00
parent c13bd83528
commit 61adaf8187
104 changed files with 387 additions and 381 deletions

View file

@ -444,7 +444,7 @@ fn layout_of_uncached<'tcx>(
}
// Types with no meaningful known layout.
ty::Projection(_) | ty::Opaque(..) => {
ty::Alias(ty::Projection, _) | ty::Alias(ty::Opaque, ..) => {
// NOTE(eddyb) `layout_of` query should've normalized these away,
// if that was possible, so there's no reason to try again here.
return Err(LayoutError::Unknown(ty));

View file

@ -152,7 +152,10 @@ where
queue_type(self, required);
}
}
ty::Array(..) | ty::Opaque(..) | ty::Projection(..) | ty::Param(_) => {
ty::Array(..)
| ty::Alias(ty::Opaque, ..)
| ty::Alias(ty::Projection, ..)
| ty::Param(_) => {
if ty == component {
// Return the type to the caller: they may be able
// to normalize further than we can.

View file

@ -37,7 +37,7 @@ fn sized_constraint_for_ty<'tcx>(
.collect()
}
Projection(..) | Opaque(..) => {
Alias(..) => {
// must calculate explicitly.
// FIXME: consider special-casing always-Sized projections
vec![ty]