Skip to content

Commit 72bb5c7

Browse files
committed
change NodeId to HirId in some HIR docs
1 parent 88961b0 commit 72bb5c7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustc/hir/map/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mod def_collector;
3535
pub mod definitions;
3636
mod hir_id_validator;
3737

38-
/// Represents an entry and its parent `NodeId`.
38+
/// Represents an entry and its parent `HirId`.
3939
#[derive(Copy, Clone, Debug)]
4040
pub struct Entry<'hir> {
4141
parent: HirId,
@@ -200,7 +200,7 @@ impl<'hir> Map<'hir> {
200200
/// "reveals" the content of a node to the caller (who might not
201201
/// otherwise have had access to those contents, and hence needs a
202202
/// read recorded). If the function just returns a DefId or
203-
/// NodeId, no actual content was returned, so no read is needed.
203+
/// HirId, no actual content was returned, so no read is needed.
204204
pub fn read(&self, hir_id: HirId) {
205205
if let Some(entry) = self.lookup(hir_id) {
206206
self.dep_graph.read_index(entry.dep_node);
@@ -681,7 +681,7 @@ impl<'hir> Map<'hir> {
681681

682682
/// If there is some error when walking the parents (e.g., a node does not
683683
/// have a parent in the map or a node can't be found), then we return the
684-
/// last good `NodeId` we found. Note that reaching the crate root (`id == 0`),
684+
/// last good `HirId` we found. Note that reaching the crate root (`id == 0`),
685685
/// is not an error, since items in the crate module have the crate root as
686686
/// parent.
687687
fn walk_parent_nodes<F, F2>(&self,
@@ -717,15 +717,15 @@ impl<'hir> Map<'hir> {
717717
}
718718
}
719719

720-
/// Retrieves the `NodeId` for `id`'s enclosing method, unless there's a
720+
/// Retrieves the `HirId` for `id`'s enclosing method, unless there's a
721721
/// `while` or `loop` before reaching it, as block tail returns are not
722722
/// available in them.
723723
///
724724
/// ```
725725
/// fn foo(x: usize) -> bool {
726726
/// if x == 1 {
727727
/// true // `get_return_block` gets passed the `id` corresponding
728-
/// } else { // to this, it will return `foo`'s `NodeId`.
728+
/// } else { // to this, it will return `foo`'s `HirId`.
729729
/// false
730730
/// }
731731
/// }

src/librustc/hir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,8 +2177,8 @@ pub enum UseKind {
21772177
/// References to traits in impls.
21782178
///
21792179
/// `resolve` maps each `TraitRef`'s `ref_id` to its defining trait; that's all
2180-
/// that the `ref_id` is for. Note that `ref_id`'s value is not the `NodeId` of the
2181-
/// trait being referred to but just a unique `NodeId` that serves as a key
2180+
/// that the `ref_id` is for. Note that `ref_id`'s value is not the `HirId` of the
2181+
/// trait being referred to but just a unique `HirId` that serves as a key
21822182
/// within the resolution map.
21832183
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
21842184
pub struct TraitRef {

0 commit comments

Comments
 (0)