From 675bfb6d169f29ffc3b0eadeab81901a32b79e73 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Tue, 2 Jul 2019 08:45:56 +0200 Subject: [PATCH] fix a dep_graph doc regarding type_of_item --- src/librustc/dep_graph/dep_tracking_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/dep_graph/dep_tracking_map.rs b/src/librustc/dep_graph/dep_tracking_map.rs index 31d5780a0c00b..ee22d0b755a09 100644 --- a/src/librustc/dep_graph/dep_tracking_map.rs +++ b/src/librustc/dep_graph/dep_tracking_map.rs @@ -55,7 +55,7 @@ impl MemoizationMap for RefCell> { /// /// ``` /// fn type_of_item(..., item: &hir::Item) -> Ty<'tcx> { - /// let item_def_id = ccx.tcx.hir().local_def_id_from_node_id(it.id); + /// let item_def_id = ccx.tcx.hir().local_def_id(it.hir_id); /// ccx.tcx.item_types.memoized(item_def_id, || { /// ccx.tcx.dep_graph.read(DepNode::Hir(item_def_id)); // (*) /// compute_type_of_item(ccx, item)