Add of_trait to DefKind::Impl.

This commit is contained in:
Camille GILLOT 2023-02-12 18:26:47 +00:00
parent 9bb6e60d1f
commit 03dff82d59
28 changed files with 68 additions and 64 deletions

View file

@ -1061,7 +1061,7 @@ impl<'a, 'tcx> FindInferSourceVisitor<'a, 'tcx> {
};
let parent_def_id = generics.parent.unwrap();
if tcx.def_kind(parent_def_id) == DefKind::Impl {
if let DefKind::Impl { .. } = tcx.def_kind(parent_def_id) {
let parent_ty = tcx.bound_type_of(parent_def_id).subst(tcx, substs);
match (parent_ty.kind(), &ty.kind) {
(