Remove span from BrAnon.

This commit is contained in:
Camille GILLOT 2023-08-03 15:56:56 +00:00
parent ded1a8b026
commit 26cb34cd18
39 changed files with 76 additions and 107 deletions

View file

@ -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)
}