Skip to content

Commit

Permalink
Update compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay authored Apr 15, 2023
1 parent b506d96 commit 4c80f58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ 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 unconstrained lifetime variables in implied
// bounds. See #110161 for context.
// We do not expect existential variables in implied bounds.
// We may however encounter unconstrained lifetime variables in invalid
// code. See #110161 for context.
assert!(!ty.has_non_region_infer());
if ty.needs_infer() {
self.tcx.sess.delay_span_bug(
Expand Down

0 comments on commit 4c80f58

Please sign in to comment.