Combine identical alias arms
This commit is contained in:
parent
61adaf8187
commit
96cb18e864
29 changed files with 69 additions and 120 deletions
|
@ -651,12 +651,7 @@ impl<'tcx> TypeSuperFoldable<'tcx> for Ty<'tcx> {
|
|||
}
|
||||
ty::GeneratorWitness(types) => ty::GeneratorWitness(types.try_fold_with(folder)?),
|
||||
ty::Closure(did, substs) => ty::Closure(did, substs.try_fold_with(folder)?),
|
||||
ty::Alias(ty::Projection, data) => {
|
||||
ty::Alias(ty::Projection, data.try_fold_with(folder)?)
|
||||
}
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs }) => {
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs: substs.try_fold_with(folder)? })
|
||||
}
|
||||
ty::Alias(kind, data) => ty::Alias(kind, data.try_fold_with(folder)?),
|
||||
|
||||
ty::Bool
|
||||
| ty::Char
|
||||
|
@ -701,10 +696,7 @@ impl<'tcx> TypeSuperVisitable<'tcx> for Ty<'tcx> {
|
|||
ty::Generator(_did, ref substs, _) => substs.visit_with(visitor),
|
||||
ty::GeneratorWitness(ref types) => types.visit_with(visitor),
|
||||
ty::Closure(_did, ref substs) => substs.visit_with(visitor),
|
||||
ty::Alias(ty::Projection, ref data) => data.visit_with(visitor),
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id: _, ref substs }) => {
|
||||
substs.visit_with(visitor)
|
||||
}
|
||||
ty::Alias(_, ref data) => data.visit_with(visitor),
|
||||
|
||||
ty::Bool
|
||||
| ty::Char
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue