Rename super_relate_* to structurally_relate_*

This commit is contained in:
Michael Goulet 2023-05-10 01:41:06 +00:00
parent 6d0b6c0d2c
commit 41501c7449
6 changed files with 26 additions and 23 deletions

View file

@ -145,7 +145,7 @@ impl<'tcx> InferCtxt<'tcx> {
Ok(a)
}
_ => ty::relate::super_relate_tys(relation, a, b),
_ => ty::relate::structurally_relate_tys(relation, a, b),
}
}
@ -245,7 +245,7 @@ impl<'tcx> InferCtxt<'tcx> {
_ => {}
}
ty::relate::super_relate_consts(relation, a, b)
ty::relate::structurally_relate_consts(relation, a, b)
}
/// Unifies the const variable `target_vid` with the given constant.

View file

@ -2723,7 +2723,7 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> {
| (ty::Infer(ty::InferTy::TyVar(_)), _)
| (_, ty::Infer(ty::InferTy::TyVar(_))) => Ok(a),
(ty::Infer(_), _) | (_, ty::Infer(_)) => Err(TypeError::Mismatch),
_ => relate::super_relate_tys(self, a, b),
_ => relate::structurally_relate_tys(self, a, b),
}
}

View file

@ -306,7 +306,7 @@ where
}
}
_ => relate::super_relate_tys(self, t, t),
_ => relate::structurally_relate_tys(self, t, t),
}?;
self.cache.insert(t, g);
@ -422,7 +422,7 @@ where
Err(TypeError::Mismatch)
}
}
_ => relate::super_relate_consts(self, c, c),
_ => relate::structurally_relate_consts(self, c, c),
}
}

View file

@ -187,7 +187,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
} else if pattern == value {
Ok(pattern)
} else {
relate::super_relate_tys(self, pattern, value)
relate::structurally_relate_tys(self, pattern, value)
}
}
@ -201,7 +201,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
if pattern == value {
Ok(pattern)
} else {
relate::super_relate_consts(self, pattern, value)
relate::structurally_relate_consts(self, pattern, value)
}
}