]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/build/scope.rs
Various minor/cosmetic improvements to code
[rust.git] / src / librustc_mir / build / scope.rs
index 2a11f24095b063f95066036c616811e6ca4a84e6..8c948766314e8fb988a6db2d5dfe0e9fd145d5da 100644 (file)
@@ -152,7 +152,7 @@ struct DropData<'tcx> {
 pub(crate) struct CachedBlock {
     /// The cached block for the cleanups-on-diverge path. This block
     /// contains code to run the current drop and all the preceding
-    /// drops (i.e. those having lower index in Drop’s Scope drop
+    /// drops (i.e., those having lower index in Drop’s Scope drop
     /// array)
     unwind: Option<BasicBlock>,
 
@@ -182,7 +182,7 @@ pub struct BreakableScope<'tcx> {
     /// Block to branch into when the loop or block terminates (either by being `break`-en out
     /// from, or by having its condition to become false)
     pub break_block: BasicBlock,
-    /// The destination of the loop/block expression itself (i.e. where to put the result of a
+    /// The destination of the loop/block expression itself (i.e., where to put the result of a
     /// `break` expression)
     pub break_destination: Place<'tcx>,
 }
@@ -322,11 +322,11 @@ pub fn in_scope<F, R>(&mut self,
             let same_lint_scopes = tcx.dep_graph.with_ignore(|| {
                 let sets = tcx.lint_levels(LOCAL_CRATE);
                 let parent_hir_id =
-                    tcx.hir.definitions().node_to_hir_id(
+                    tcx.hir().definitions().node_to_hir_id(
                         self.source_scope_local_data[source_scope].lint_root
                     );
                 let current_hir_id =
-                    tcx.hir.definitions().node_to_hir_id(node_id);
+                    tcx.hir().definitions().node_to_hir_id(node_id);
                 sets.lint_level_set(parent_hir_id) ==
                     sets.lint_level_set(current_hir_id)
             });
@@ -737,7 +737,7 @@ pub fn schedule_drop(
             //
             // Note that this code iterates scopes from the inner-most to the outer-most,
             // invalidating caches of each scope visited. This way bare minimum of the
-            // caches gets invalidated. i.e. if a new drop is added into the middle scope, the
+            // caches gets invalidated. i.e., if a new drop is added into the middle scope, the
             // cache of outer scpoe stays intact.
             scope.invalidate_cache(!needs_drop, this_scope);
             if this_scope {