1
Fork 0

check all dyn obligations, actually

This commit is contained in:
Michael Goulet 2022-01-31 19:11:23 -08:00
parent f14a5fd712
commit 67ef11dc2a
4 changed files with 49 additions and 29 deletions

View file

@ -468,23 +468,19 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
.predicates
.into_iter()
{
if let ty::PredicateKind::Trait(..) | ty::PredicateKind::Projection(..) =
super_trait.kind().skip_binder()
{
let normalized_super_trait = normalize_with_depth_to(
self,
obligation.param_env,
obligation.cause.clone(),
obligation.recursion_depth + 1,
super_trait,
&mut nested,
);
nested.push(Obligation::new(
obligation.cause.clone(),
obligation.param_env,
normalized_super_trait,
));
}
let normalized_super_trait = normalize_with_depth_to(
self,
obligation.param_env,
obligation.cause.clone(),
obligation.recursion_depth + 1,
super_trait,
&mut nested,
);
nested.push(Obligation::new(
obligation.cause.clone(),
obligation.param_env,
normalized_super_trait,
));
}
let assoc_types: Vec<_> = tcx