1
Fork 0

implement review suggestions

This commit is contained in:
Ezra Shaw 2023-04-14 20:18:28 +12:00
parent ecf2a9b75e
commit b506d966a3
No known key found for this signature in database
GPG key ID: 67ABF16FB0ECD870
3 changed files with 12 additions and 9 deletions

View file

@ -56,11 +56,12 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
let ty = self.resolve_vars_if_possible(ty);
let ty = OpportunisticRegionResolver::new(self).fold_ty(ty);
// We must avoid processing constrained lifetime variables in implied
// We must avoid processing unconstrained lifetime variables in implied
// bounds. See #110161 for context.
assert!(!ty.has_non_region_infer());
if ty.needs_infer() {
self.tcx.sess.delay_span_bug(
self.tcx.source_span_untracked(body_id),
self.tcx.def_span(body_id),
"skipped implied_outlives_bounds due to unconstrained lifetimes",
);
return vec![];