Unnamed repository; edit this file 'description' to name the repository.
Merge #10158
10158: Add crate name to nameres panic context r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
bors[bot] 2021-09-05
parent c16e647 · parent 65bb5d7 · commit ab8e3c0
-rw-r--r--crates/hir_def/src/nameres/path_resolution.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs
index 667d31e6fa..e71805bc8e 100644
--- a/crates/hir_def/src/nameres/path_resolution.rs
+++ b/crates/hir_def/src/nameres/path_resolution.rs
@@ -178,9 +178,10 @@ impl DefMap {
path: &ModPath,
shadow: BuiltinShadowMode,
) -> ResolvePathResult {
+ let graph = db.crate_graph();
let _cx = stdx::panic_context::enter(format!(
- "DefMap {:?} {:?} path {}",
- self.krate, self.block, path
+ "DefMap {:?} crate_name={:?} block={:?} path={}",
+ self.krate, graph[self.krate].display_name, self.block, path
));
let mut segments = path.segments().iter().enumerate();