diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-08-31 09:58:32 -0400 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2018-08-31 12:05:36 -0500 |
| commit | 422ea04f746aa3c1dd3598bba7671f7d767519bf (patch) | |
| tree | 05b352d6f0a929ad5fb0db05e2a446ecd1341f46 /src/doc/rustc-dev-guide | |
| parent | 7e0b8f6878a99a3d866af714d541af6b8d039a33 (diff) | |
| download | rust-422ea04f746aa3c1dd3598bba7671f7d767519bf.tar.gz rust-422ea04f746aa3c1dd3598bba7671f7d767519bf.zip | |
tweak long line
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/hir.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/hir.md b/src/doc/rustc-dev-guide/src/hir.md index 171319011de..a5e99e8b3b5 100644 --- a/src/doc/rustc-dev-guide/src/hir.md +++ b/src/doc/rustc-dev-guide/src/hir.md @@ -116,11 +116,12 @@ with an HIR node. [number of methods]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/map/struct.Map.html#methods For example, if you have a [`DefId`], and you would like to convert it -to a [`NodeId`], you can use [`tcx.hir.as_local_node_id(def_id)`][as_local_node_id]. This -returns an `Option<NodeId>` – this will be `None` if the def-id -refers to something outside of the current crate (since then it has no -HIR node), but otherwise returns `Some(n)` where `n` is the node-id of -the definition. +to a [`NodeId`], you can use +[`tcx.hir.as_local_node_id(def_id)`][as_local_node_id]. This returns +an `Option<NodeId>` – this will be `None` if the def-id refers to +something outside of the current crate (since then it has no HIR +node), but otherwise returns `Some(n)` where `n` is the node-id of the +definition. [as_local_node_id]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/map/struct.Map.html#method.as_local_node_id |
