1
Fork 0

Don't expect early-bound region to be local in RPITIT well-formedness

This commit is contained in:
Michael Goulet 2024-02-06 16:01:54 +00:00
parent 037f515caf
commit d9cd0d4d11
4 changed files with 39 additions and 1 deletions

View file

@ -1193,7 +1193,7 @@ impl<'tcx> TyCtxt<'tcx> {
let (suitable_region_binding_scope, bound_region) = loop {
let def_id = match region.kind() {
ty::ReLateParam(fr) => fr.bound_region.get_id()?.as_local()?,
ty::ReEarlyParam(ebr) => ebr.def_id.expect_local(),
ty::ReEarlyParam(ebr) => ebr.def_id.as_local()?,
_ => return None, // not a free region
};
let scope = self.local_parent(def_id);