Combine identical alias arms
This commit is contained in:
parent
61adaf8187
commit
96cb18e864
29 changed files with 69 additions and 120 deletions
|
@ -444,7 +444,7 @@ fn layout_of_uncached<'tcx>(
|
|||
}
|
||||
|
||||
// Types with no meaningful known layout.
|
||||
ty::Alias(ty::Projection, _) | ty::Alias(ty::Opaque, ..) => {
|
||||
ty::Alias(..) => {
|
||||
// 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));
|
||||
|
|
|
@ -152,10 +152,7 @@ where
|
|||
queue_type(self, required);
|
||||
}
|
||||
}
|
||||
ty::Array(..)
|
||||
| ty::Alias(ty::Opaque, ..)
|
||||
| ty::Alias(ty::Projection, ..)
|
||||
| ty::Param(_) => {
|
||||
ty::Array(..) | ty::Alias(..) | ty::Param(_) => {
|
||||
if ty == component {
|
||||
// Return the type to the caller: they may be able
|
||||
// to normalize further than we can.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue