Skip to content

Commit 5321d00

Browse files
nikomatsakismark-i-m
authored andcommitted
tweak long line
1 parent f893fe8 commit 5321d00

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/hir.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,12 @@ with an HIR node.
116116
[number of methods]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/map/struct.Map.html#methods
117117

118118
For example, if you have a [`DefId`], and you would like to convert it
119-
to a [`NodeId`], you can use [`tcx.hir.as_local_node_id(def_id)`][as_local_node_id]. This
120-
returns an `Option<NodeId>` – this will be `None` if the def-id
121-
refers to something outside of the current crate (since then it has no
122-
HIR node), but otherwise returns `Some(n)` where `n` is the node-id of
123-
the definition.
119+
to a [`NodeId`], you can use
120+
[`tcx.hir.as_local_node_id(def_id)`][as_local_node_id]. This returns
121+
an `Option<NodeId>` – this will be `None` if the def-id refers to
122+
something outside of the current crate (since then it has no HIR
123+
node), but otherwise returns `Some(n)` where `n` is the node-id of the
124+
definition.
124125

125126
[as_local_node_id]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/map/struct.Map.html#method.as_local_node_id
126127

0 commit comments

Comments
 (0)