Allow LocalDefId as the argument to def_path_str
This commit is contained in:
@@ -1217,7 +1217,7 @@ fn upstream_crates(tcx: TyCtxt<'_>) -> Vec<(StableCrateId, Svh)> {
|
||||
}
|
||||
|
||||
fn hir_id_to_string(map: Map<'_>, id: HirId) -> String {
|
||||
let path_str = |def_id: LocalDefId| map.tcx.def_path_str(def_id.to_def_id());
|
||||
let path_str = |def_id: LocalDefId| map.tcx.def_path_str(def_id);
|
||||
|
||||
let span_str = || map.tcx.sess.source_map().span_to_snippet(map.span(id)).unwrap_or_default();
|
||||
let node_str = |prefix| format!("{id} ({prefix} `{}`)", span_str());
|
||||
|
||||
Reference in New Issue
Block a user