diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 86678b802f8..ad45a293468 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -1421,8 +1421,13 @@ pub(crate) fn value_ty_query(db: &dyn HirDatabase, def: ValueTyDefId) -> Binders } pub(crate) fn impl_self_ty_query(db: &dyn HirDatabase, impl_id: ImplId) -> Binders { + let impl_loc = impl_id.lookup(db.upcast()); let impl_data = db.impl_data(impl_id); let resolver = impl_id.resolver(db.upcast()); + let _cx = stdx::panic_context::enter(format!( + "impl_self_ty_query({:?} -> {:?} -> {:?})", + impl_id, impl_loc, impl_data + )); let generics = generics(db.upcast(), impl_id.into()); let ctx = TyLoweringContext::new(db, &resolver).with_type_param_mode(TypeParamLoweringMode::Variable); @@ -1448,10 +1453,13 @@ pub(crate) fn impl_self_ty_recover( } pub(crate) fn impl_trait_query(db: &dyn HirDatabase, impl_id: ImplId) -> Option> { + let impl_loc = impl_id.lookup(db.upcast()); let impl_data = db.impl_data(impl_id); let resolver = impl_id.resolver(db.upcast()); - let _cx = - stdx::panic_context::enter(format!("impl_trait_query({:?} -> {:?})", impl_id, impl_data)); + let _cx = stdx::panic_context::enter(format!( + "impl_trait_query({:?} -> {:?} -> {:?})", + impl_id, impl_loc, impl_data + )); let ctx = TyLoweringContext::new(db, &resolver).with_type_param_mode(TypeParamLoweringMode::Variable); let (self_ty, binders) = db.impl_self_ty(impl_id).into_value_and_skipped_binders();