10158: Add crate name to nameres panic context r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2021-09-05 16:49:22 +00:00 committed by GitHub
commit ab8e3c0a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();