Skip to content

Commit 675bfb6

Browse files
committed
fix a dep_graph doc regarding type_of_item
1 parent 01e0d83 commit 675bfb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/dep_graph/dep_tracking_map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl<M: DepTrackingMapConfig> MemoizationMap for RefCell<DepTrackingMap<M>> {
5555
///
5656
/// ```
5757
/// fn type_of_item(..., item: &hir::Item) -> Ty<'tcx> {
58-
/// let item_def_id = ccx.tcx.hir().local_def_id_from_node_id(it.id);
58+
/// let item_def_id = ccx.tcx.hir().local_def_id(it.hir_id);
5959
/// ccx.tcx.item_types.memoized(item_def_id, || {
6060
/// ccx.tcx.dep_graph.read(DepNode::Hir(item_def_id)); // (*)
6161
/// compute_type_of_item(ccx, item)

0 commit comments

Comments
 (0)