Skip to content

Commit 2cf82ff

Browse files
committed
fix: updated to use hir-def representation
1 parent 98a2d2c commit 2cf82ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/hir/src/display.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ fn write_impl_header<'db>(impl_: &Impl, f: &mut HirFormatter<'_, 'db>) -> Result
192192
let def_id = GenericDefId::ImplId(impl_.id);
193193
write_generic_params(def_id, f)?;
194194

195-
if let Some(trait_ref) = impl_.trait_ref(db) {
195+
let impl_data = db.impl_signature(impl_.id);
196+
if let Some(target_trait) = &impl_data.target_trait {
196197
f.write_char(' ')?;
197-
trait_ref.hir_fmt(f)?;
198+
hir_display_with_store(&impl_data.store[target_trait.path], &impl_data.store).hir_fmt(f)?;
198199
f.write_str(" for")?;
199200
}
200201

0 commit comments

Comments
 (0)