1
Fork 0

Fix bugs in evaluating WellFormed predicates

- List the nestsed obligations in an order that works with the
  single pass used by evaluation
- Propagate recursion depth correctly
This commit is contained in:
Matthew Jasper 2020-07-22 22:43:18 +01:00
parent f52b2d8890
commit bc08b791bc
8 changed files with 117 additions and 42 deletions

View file

@ -561,7 +561,7 @@ fn check_opaque_meets_bounds<'tcx>(
let misc_cause = traits::ObligationCause::misc(span, hir_id);
let (_, opaque_type_map) = inh.register_infer_ok_obligations(
infcx.instantiate_opaque_types(def_id.to_def_id(), hir_id, param_env, &opaque_ty, span),
infcx.instantiate_opaque_types(def_id, hir_id, param_env, &opaque_ty, span),
);
for (def_id, opaque_defn) in opaque_type_map {

View file

@ -337,6 +337,7 @@ fn check_predicates<'tcx>(
infcx,
tcx.param_env(impl1_def_id),
tcx.hir().local_def_id_to_hir_id(impl1_def_id),
0,
arg,
span,
) {