summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/outlives_bounds.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/outlives_bounds.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
index 32bbd626d..7513f88cf 100644
--- a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
+++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
@@ -72,7 +72,7 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
};
let mut constraints = QueryRegionConstraints::default();
- let Ok(InferOk { value, obligations }) = self
+ let Ok(InferOk { value: mut bounds, obligations }) = self
.instantiate_nll_query_response_and_region_obligations(
&ObligationCause::dummy(),
param_env,
@@ -85,6 +85,10 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
};
assert_eq!(&obligations, &[]);
+ // Because of #109628, we may have unexpected placeholders. Ignore them!
+ // FIXME(#109628): panic in this case once the issue is fixed.
+ bounds.retain(|bound| !bound.has_placeholders());
+
if !constraints.is_empty() {
let span = self.tcx.def_span(body_id);
@@ -107,14 +111,14 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
let errors = ocx.select_all_or_error();
if !errors.is_empty() {
- self.tcx.sess.delay_span_bug(
+ self.tcx.sess.span_delayed_bug(
span,
"implied_outlives_bounds failed to solve obligations from instantiation",
);
}
};
- value
+ bounds
}
fn implied_bounds_tys(