Update hir.md
Fix method name and the link, as it's outdated.
This commit is contained in:
parent
e38fa37202
commit
e8b989eb3b
|
|
@ -117,9 +117,9 @@ that `n` must be some HIR expression, you can do
|
||||||
[Expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Expr.html
|
[Expr]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Expr.html
|
||||||
|
|
||||||
Finally, you can use the HIR map to find the parents of nodes, via
|
Finally, you can use the HIR map to find the parents of nodes, via
|
||||||
calls like [`tcx.hir().get_parent_node(n)`][get_parent_node].
|
calls like [`tcx.hir().get_parent(n)`][get_parent].
|
||||||
|
|
||||||
[get_parent_node]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.get_parent_node
|
[get_parent]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.get_parent
|
||||||
|
|
||||||
## HIR Bodies
|
## HIR Bodies
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue