1
Fork 0

small type system cleanup

This commit is contained in:
lcnr 2023-04-19 10:29:29 +02:00
parent 5fe3528be5
commit 16d061ea77
2 changed files with 15 additions and 24 deletions

View file

@ -178,7 +178,7 @@ impl FlagComputation {
&ty::Alias(ty::Projection, data) => {
self.add_flags(TypeFlags::HAS_TY_PROJECTION);
self.add_projection_ty(data);
self.add_alias_ty(data);
}
&ty::Alias(ty::Opaque, ty::AliasTy { substs, .. }) => {
@ -267,7 +267,7 @@ impl FlagComputation {
projection_ty,
term,
})) => {
self.add_projection_ty(projection_ty);
self.add_alias_ty(projection_ty);
self.add_term(term);
}
ty::PredicateKind::WellFormed(arg) => {
@ -372,8 +372,8 @@ impl FlagComputation {
}
}
fn add_projection_ty(&mut self, projection_ty: ty::AliasTy<'_>) {
self.add_substs(projection_ty.substs);
fn add_alias_ty(&mut self, alias_ty: ty::AliasTy<'_>) {
self.add_substs(alias_ty.substs);
}
fn add_substs(&mut self, substs: &[GenericArg<'_>]) {