Skip to content

Commit b6cc460

Browse files
pourplusquoitshepang
authored andcommitted
Update hir.md
Fix method name and the link, as it's outdated.
1 parent 5ecd75a commit b6cc460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hir.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ that `n` must be some HIR expression, you can do
117117
[Expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Expr.html
118118

119119
Finally, you can use the HIR map to find the parents of nodes, via
120-
calls like [`tcx.hir().get_parent_node(n)`][get_parent_node].
120+
calls like [`tcx.hir().get_parent(n)`][get_parent].
121121

122-
[get_parent_node]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.get_parent_node
122+
[get_parent]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.get_parent
123123

124124
## HIR Bodies
125125

0 commit comments

Comments
 (0)