Skip to content

Commit 0a53a25

Browse files
committed
Handle impl/dyn Trait in match_ty
1 parent 7026d42 commit 0a53a25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

chalk-solve/src/clauses.rs

+4
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ fn match_ty(
278278
Ty::ForAll(quantified_ty) => match_ty(db, environment, &quantified_ty.ty, clauses),
279279
Ty::BoundVar(_) => {}
280280
Ty::InferenceVar(_) => panic!("should have floundered"),
281+
Ty::Dyn(qwc) | Ty::Opaque(qwc) => {
282+
let wc = qwc.substitute(&[ty.clone().cast()]);
283+
clauses.extend(wc.into_iter().casted());
284+
}
281285
}
282286
}
283287

0 commit comments

Comments
 (0)