Skip to content

Commit aa1cdc0

Browse files
Merge #10095
10095: internal: Augment panic context when resolving path r=jonas-schievink a=jonas-schievink Should help with debugging #10084 and similar issues. Might have a perf impact since the string is created on every function call. Co-authored-by: Jonas Schievink <[email protected]>
2 parents 4786a22 + b1a4784 commit aa1cdc0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/hir_def/src/nameres/path_resolution.rs

+5
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ impl DefMap {
178178
path: &ModPath,
179179
shadow: BuiltinShadowMode,
180180
) -> ResolvePathResult {
181+
let _cx = stdx::panic_context::enter(format!(
182+
"DefMap {:?} {:?} path {}",
183+
self.krate, self.block, path
184+
));
185+
181186
let mut segments = path.segments().iter().enumerate();
182187
let mut curr_per_ns: PerNs = match path.kind {
183188
PathKind::DollarCrate(krate) => {

0 commit comments

Comments
 (0)