Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/item_scope.rs')
-rw-r--r--crates/hir-def/src/item_scope.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/hir-def/src/item_scope.rs b/crates/hir-def/src/item_scope.rs
index 991e447033..3ed321d189 100644
--- a/crates/hir-def/src/item_scope.rs
+++ b/crates/hir-def/src/item_scope.rs
@@ -4,7 +4,7 @@
use std::collections::hash_map::Entry;
use base_db::CrateId;
-use hir_expand::{attrs::AttrId, name::Name, AstId, MacroCallId};
+use hir_expand::{attrs::AttrId, db::ExpandDatabase, name::Name, AstId, MacroCallId};
use itertools::Itertools;
use once_cell::sync::Lazy;
use profile::Count;
@@ -358,12 +358,16 @@ impl ItemScope {
}
}
- pub(crate) fn dump(&self, buf: &mut String) {
+ pub(crate) fn dump(&self, db: &dyn ExpandDatabase, buf: &mut String) {
let mut entries: Vec<_> = self.resolutions().collect();
entries.sort_by_key(|(name, _)| name.clone());
for (name, def) in entries {
- format_to!(buf, "{}:", name.map_or("_".to_string(), |name| name.to_string()));
+ format_to!(
+ buf,
+ "{}:",
+ name.map_or("_".to_string(), |name| name.display(db).to_string())
+ );
if def.types.is_some() {
buf.push_str(" t");