]> git.lizzy.rs Git - rust.git/commitdiff
Comment tweaks
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Thu, 6 Feb 2020 13:11:57 +0000 (14:11 +0100)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Thu, 6 Feb 2020 13:14:50 +0000 (14:14 +0100)
src/librustc/query/mod.rs
src/librustc/ty/context.rs

index 82ff7da13aea85fd24ad4bbeab2bf04d405ad9ca..4842719d804da534e968486839ed5e4019772469 100644 (file)
@@ -43,7 +43,7 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
     }
 
     Other {
-        // Represents crate as a whole (as distinct from the to-level crate module).
+        // Represents crate as a whole (as distinct from the top-level crate module).
         // If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
         // we will have to assume that any change means that you need to be recompiled.
         // This is because the `hir_crate` query gives you access to all other items.
index 8979292c86d407148ee0d4be3ddc6342147e19e5..8386058f72ac7e692e57de3e350ad3d6aa7b63fd 100644 (file)
@@ -966,6 +966,7 @@ pub struct GlobalCtxt<'tcx> {
     /// Export map produced by name resolution.
     export_map: FxHashMap<DefId, Vec<Export<hir::HirId>>>,
 
+    /// This should usually be accessed with the `tcx.hir()` method.
     pub(crate) hir_map: hir_map::Map<'tcx>,
 
     /// A map from `DefPathHash` -> `DefId`. Includes `DefId`s from the local crate