]> git.lizzy.rs Git - rust.git/commitdiff
change NodeId to HirId in some HIR docs
authorljedrz <ljedrz@gmail.com>
Sun, 16 Jun 2019 15:44:19 +0000 (17:44 +0200)
committerljedrz <ljedrz@gmail.com>
Mon, 17 Jun 2019 16:59:27 +0000 (18:59 +0200)
src/librustc/hir/map/mod.rs
src/librustc/hir/mod.rs

index 18b8d23a455c99aa5c6efdd89c25df3a60e85e64..85c86991f489a9a6bb3f5f558a0b4e9a5a5385be 100644 (file)
@@ -35,7 +35,7 @@
 pub mod definitions;
 mod hir_id_validator;
 
-/// Represents an entry and its parent `NodeId`.
+/// Represents an entry and its parent `HirId`.
 #[derive(Copy, Clone, Debug)]
 pub struct Entry<'hir> {
     parent: HirId,
@@ -200,7 +200,7 @@ fn lookup(&self, id: HirId) -> Option<&Entry<'hir>> {
     /// "reveals" the content of a node to the caller (who might not
     /// otherwise have had access to those contents, and hence needs a
     /// read recorded). If the function just returns a DefId or
-    /// NodeId, no actual content was returned, so no read is needed.
+    /// HirId, no actual content was returned, so no read is needed.
     pub fn read(&self, hir_id: HirId) {
         if let Some(entry) = self.lookup(hir_id) {
             self.dep_graph.read_index(entry.dep_node);
@@ -681,7 +681,7 @@ pub fn is_const_scope(&self, hir_id: HirId) -> bool {
 
     /// If there is some error when walking the parents (e.g., a node does not
     /// have a parent in the map or a node can't be found), then we return the
-    /// last good `NodeId` we found. Note that reaching the crate root (`id == 0`),
+    /// last good `HirId` we found. Note that reaching the crate root (`id == 0`),
     /// is not an error, since items in the crate module have the crate root as
     /// parent.
     fn walk_parent_nodes<F, F2>(&self,
@@ -717,7 +717,7 @@ fn walk_parent_nodes<F, F2>(&self,
         }
     }
 
-    /// Retrieves the `NodeId` for `id`'s enclosing method, unless there's a
+    /// Retrieves the `HirId` for `id`'s enclosing method, unless there's a
     /// `while` or `loop` before reaching it, as block tail returns are not
     /// available in them.
     ///
@@ -725,7 +725,7 @@ fn walk_parent_nodes<F, F2>(&self,
     /// fn foo(x: usize) -> bool {
     ///     if x == 1 {
     ///         true  // `get_return_block` gets passed the `id` corresponding
-    ///     } else {  // to this, it will return `foo`'s `NodeId`.
+    ///     } else {  // to this, it will return `foo`'s `HirId`.
     ///         false
     ///     }
     /// }
index 6ace4c4174b56b39821d29864c700851acd48fd9..0884a726a27b0b58d38e55456fec44632cc2696e 100644 (file)
@@ -2177,8 +2177,8 @@ pub enum UseKind {
 /// References to traits in impls.
 ///
 /// `resolve` maps each `TraitRef`'s `ref_id` to its defining trait; that's all
-/// that the `ref_id` is for. Note that `ref_id`'s value is not the `NodeId` of the
-/// trait being referred to but just a unique `NodeId` that serves as a key
+/// that the `ref_id` is for. Note that `ref_id`'s value is not the `HirId` of the
+/// trait being referred to but just a unique `HirId` that serves as a key
 /// within the resolution map.
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
 pub struct TraitRef {