Remove index from BrAnon
This commit is contained in:
parent
e4edf00f12
commit
f0edcc8a6f
33 changed files with 68 additions and 88 deletions
|
@ -257,7 +257,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
|
|||
self.primitive_var_infos.push(CanonicalVarInfo { kind });
|
||||
var
|
||||
});
|
||||
let br = ty::BoundRegion { var, kind: BrAnon(var.as_u32(), None) };
|
||||
let br = ty::BoundRegion { var, kind: BrAnon(None) };
|
||||
self.interner().mk_re_late_bound(self.binder_index, br)
|
||||
}
|
||||
|
||||
|
|
|
@ -3017,7 +3017,7 @@ fn bind_generator_hidden_types_above<'tcx>(
|
|||
if let ty::ReErased = r.kind() {
|
||||
let br = ty::BoundRegion {
|
||||
var: ty::BoundVar::from_u32(counter),
|
||||
kind: ty::BrAnon(counter, None),
|
||||
kind: ty::BrAnon(None),
|
||||
};
|
||||
counter += 1;
|
||||
r = tcx.mk_re_late_bound(current_depth, br);
|
||||
|
@ -3033,7 +3033,7 @@ fn bind_generator_hidden_types_above<'tcx>(
|
|||
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(|i| ty::BoundVariableKind::Region(ty::BrAnon(i, None))),
|
||||
(num_bound_variables..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon(None))),
|
||||
));
|
||||
ty::Binder::bind_with_vars(hidden_types, bound_vars)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue