diff options
Diffstat (limited to 'compiler/rustc_borrowck/src/diagnostics/mod.rs')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index c4e4e0517ec..d566117b38b 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1185,7 +1185,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { let parent_self_ty = matches!(tcx.def_kind(parent_did), rustc_hir::def::DefKind::Impl { .. }) .then_some(parent_did) - .and_then(|did| match tcx.type_of(did).kind() { + .and_then(|did| match tcx.bound_type_of(did).subst_identity().kind() { ty::Adt(def, ..) => Some(def.did()), _ => None, }); | 
