Remove span from BrAnon.
This commit is contained in:
parent
ded1a8b026
commit
26cb34cd18
39 changed files with 76 additions and 107 deletions
|
@ -94,8 +94,7 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
|
|||
let mut counter = 0;
|
||||
let ty = tcx.fold_regions(ty, |r, current_depth| match r.kind() {
|
||||
ty::ReErased => {
|
||||
let br =
|
||||
ty::BoundRegion { var: ty::BoundVar::from_u32(counter), kind: ty::BrAnon(None) };
|
||||
let br = ty::BoundRegion { var: ty::BoundVar::from_u32(counter), kind: ty::BrAnon };
|
||||
counter += 1;
|
||||
ty::Region::new_late_bound(tcx, current_depth, br)
|
||||
}
|
||||
|
@ -103,7 +102,7 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
|
|||
r => bug!("unexpected region: {r:?}"),
|
||||
});
|
||||
let bound_vars = tcx.mk_bound_variable_kinds_from_iter(
|
||||
(0..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon(None))),
|
||||
(0..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon)),
|
||||
);
|
||||
ty::Binder::bind_with_vars(ty, bound_vars)
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
|
|||
self.primitive_var_infos.push(CanonicalVarInfo { kind });
|
||||
var
|
||||
});
|
||||
let br = ty::BoundRegion { var, kind: BrAnon(None) };
|
||||
let br = ty::BoundRegion { var, kind: BrAnon };
|
||||
ty::Region::new_late_bound(self.interner(), self.binder_index, br)
|
||||
}
|
||||
|
||||
|
|
|
@ -3102,7 +3102,7 @@ fn bind_generator_hidden_types_above<'tcx>(
|
|||
ty::ReErased => {
|
||||
let br = ty::BoundRegion {
|
||||
var: ty::BoundVar::from_u32(counter),
|
||||
kind: ty::BrAnon(None),
|
||||
kind: ty::BrAnon,
|
||||
};
|
||||
counter += 1;
|
||||
ty::Region::new_late_bound(tcx, current_depth, br)
|
||||
|
@ -3118,8 +3118,9 @@ fn bind_generator_hidden_types_above<'tcx>(
|
|||
if considering_regions {
|
||||
debug_assert!(!hidden_types.has_erased_regions());
|
||||
}
|
||||
let bound_vars = tcx.mk_bound_variable_kinds_from_iter(bound_vars.iter().chain(
|
||||
(num_bound_variables..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon(None))),
|
||||
));
|
||||
let bound_vars =
|
||||
tcx.mk_bound_variable_kinds_from_iter(bound_vars.iter().chain(
|
||||
(num_bound_variables..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon)),
|
||||
));
|
||||
ty::Binder::bind_with_vars(hidden_types, bound_vars)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue