Update compiler/rustc_trait_selection/src/traits/outlives_bounds.rs

This commit is contained in:
Ali MJ Al-Nasrawy 2023-04-15 15:41:42 +03:00 committed by GitHub
parent b506d966a3
commit 4c80f58d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(