1
Fork 0

check Projection supertrait bounds when confirming dyn candidate

This commit is contained in:
Michael Goulet 2021-12-25 22:45:05 -08:00
parent 285fa7ecd0
commit f14a5fd712
3 changed files with 53 additions and 1 deletions

View file

@ -468,7 +468,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
.predicates
.into_iter()
{
if let ty::PredicateKind::Trait(..) = super_trait.kind().skip_binder() {
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,