ignore implied bounds with placeholders
This commit is contained in:
parent
492e57c6ad
commit
af79fd109b
4 changed files with 81 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
@ -114,7 +118,7 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
|
|||
}
|
||||
};
|
||||
|
||||
value
|
||||
bounds
|
||||
}
|
||||
|
||||
fn implied_bounds_tys(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue