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,
/// "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);
/// 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,
}
}
- /// 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.
///
/// 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
/// }
/// }
/// 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 {