]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/item_path.rs
Various minor/cosmetic improvements to code
[rust.git] / src / librustc / ty / item_path.rs
index 350e55288ea10a24d716d373f1be9abc652bf567..a39eb004fd7864bd711cd998955921968616d35d 100644 (file)
@@ -83,7 +83,7 @@ pub fn item_path_str(self, def_id: DefId) -> String {
 
     /// Returns a string identifying this local node-id.
     pub fn node_path_str(self, id: ast::NodeId) -> String {
-        self.item_path_str(self.hir.local_def_id(id))
+        self.item_path_str(self.hir().local_def_id(id))
     }
 
     /// Returns a string identifying this def-id. This string is
@@ -317,7 +317,7 @@ pub fn push_item_path<T>(self, buffer: &mut T, def_id: DefId, pushed_prelude_cra
 
             // Unclear if there is any value in distinguishing these.
             // Probably eventually (and maybe we would even want
-            // finer-grained distinctions, e.g. between enum/struct).
+            // finer-grained distinctions, e.g., between enum/struct).
             data @ DefPathData::Misc |
             data @ DefPathData::TypeNs(..) |
             data @ DefPathData::Trait(..) |
@@ -464,8 +464,8 @@ fn push_impl_path_fallback<T>(
         // only occur very early in the compiler pipeline.
         let parent_def_id = self.parent_def_id(impl_def_id).unwrap();
         self.push_item_path(buffer, parent_def_id, pushed_prelude_crate);
-        let node_id = self.hir.as_local_node_id(impl_def_id).unwrap();
-        let item = self.hir.expect_item(node_id);
+        let node_id = self.hir().as_local_node_id(impl_def_id).unwrap();
+        let item = self.hir().expect_item(node_id);
         let span_str = self.sess.source_map().span_to_string(item.span);
         buffer.push(&format!("<impl at {}>", span_str));
     }