rename ReLateBound to ReBound
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
This commit is contained in:
@@ -63,7 +63,7 @@ impl CanonicalVarValues<'_> {
|
||||
pub fn is_identity(&self) -> bool {
|
||||
self.var_values.iter().enumerate().all(|(bv, arg)| match arg.unpack() {
|
||||
ty::GenericArgKind::Lifetime(r) => {
|
||||
matches!(*r, ty::ReLateBound(ty::INNERMOST, br) if br.var.as_usize() == bv)
|
||||
matches!(*r, ty::ReBound(ty::INNERMOST, br) if br.var.as_usize() == bv)
|
||||
}
|
||||
ty::GenericArgKind::Type(ty) => {
|
||||
matches!(*ty.kind(), ty::Bound(ty::INNERMOST, bt) if bt.var.as_usize() == bv)
|
||||
@@ -79,7 +79,7 @@ impl CanonicalVarValues<'_> {
|
||||
for arg in self.var_values {
|
||||
match arg.unpack() {
|
||||
ty::GenericArgKind::Lifetime(r) => {
|
||||
if let ty::ReLateBound(ty::INNERMOST, br) = *r
|
||||
if let ty::ReBound(ty::INNERMOST, br) = *r
|
||||
&& var == br.var
|
||||
{
|
||||
var = var + 1;
|
||||
@@ -389,7 +389,7 @@ impl<'tcx> CanonicalVarValues<'tcx> {
|
||||
var: ty::BoundVar::from_usize(i),
|
||||
kind: ty::BrAnon,
|
||||
};
|
||||
ty::Region::new_late_bound(tcx, ty::INNERMOST, br).into()
|
||||
ty::Region::new_bound(tcx, ty::INNERMOST, br).into()
|
||||
}
|
||||
CanonicalVarKind::Effect => ty::Const::new_bound(
|
||||
tcx,
|
||||
|
||||
@@ -58,8 +58,7 @@ impl<'tcx> UnifyValue for UnifiedRegion<'tcx> {
|
||||
|
||||
fn unify_values(value1: &Self, value2: &Self) -> Result<Self, NoError> {
|
||||
// We pick the value of the least universe because it is compatible with more variables.
|
||||
// This is *not* necessary for soundness, but it allows more region variables to be
|
||||
// resolved to the said value.
|
||||
// This is *not* necessary for completeness.
|
||||
#[cold]
|
||||
fn min_universe<'tcx>(r1: Region<'tcx>, r2: Region<'tcx>) -> Region<'tcx> {
|
||||
cmp::min_by_key(r1, r2, |r| match r.kind() {
|
||||
@@ -69,7 +68,7 @@ impl<'tcx> UnifyValue for UnifiedRegion<'tcx> {
|
||||
| ty::ReEarlyBound(..)
|
||||
| ty::ReError(_) => ty::UniverseIndex::ROOT,
|
||||
ty::RePlaceholder(placeholder) => placeholder.universe,
|
||||
ty::ReVar(..) | ty::ReLateBound(..) => bug!("not a universal region"),
|
||||
ty::ReVar(..) | ty::ReBound(..) => bug!("not a universal region"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user