]> git.lizzy.rs Git - rust.git/commitdiff
words
authorBastian Kauschke <bastian_kauschke@hotmail.de>
Fri, 10 Apr 2020 05:04:11 +0000 (07:04 +0200)
committerBastian Kauschke <bastian_kauschke@hotmail.de>
Fri, 10 Apr 2020 05:04:11 +0000 (07:04 +0200)
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/writeback.rs

index eebc34d3db8eac479cb53d146339214d8c6aceb0..a5490696ba0b4355ba18f2b4cc6c7b0d98c58ad1 100644 (file)
@@ -1161,7 +1161,7 @@ impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
     fn assign(&mut self, span: Span, nid: hir::HirId, ty_opt: Option<LocalTy<'tcx>>) -> Ty<'tcx> {
         match ty_opt {
             None => {
-                // infer the variable's type
+                // Infer the variable's type.
                 let var_ty = self.fcx.next_ty_var(TypeVariableOrigin {
                     kind: TypeVariableOriginKind::TypeInference,
                     span,
@@ -1173,7 +1173,7 @@ fn assign(&mut self, span: Span, nid: hir::HirId, ty_opt: Option<LocalTy<'tcx>>)
                 var_ty
             }
             Some(typ) => {
-                // take type that the user specified
+                // Take type that the user specified.
                 self.fcx.locals.borrow_mut().insert(nid, typ);
                 typ.revealed_ty
             }
@@ -1244,7 +1244,7 @@ fn visit_pat(&mut self, p: &'tcx hir::Pat<'tcx>) {
         intravisit::walk_pat(self, p);
     }
 
-    // Don't descend into the bodies of nested closures
+    // Don't descend into the bodies of nested closures.
     fn visit_fn(
         &mut self,
         _: intravisit::FnKind<'tcx>,
@@ -1292,7 +1292,7 @@ fn check_fn<'a, 'tcx>(
 
     debug!("check_fn(sig={:?}, fn_id={}, param_env={:?})", fn_sig, fn_id, param_env);
 
-    // Create the function context.  This is either derived from scratch or,
+    // Create the function context. This is either derived from scratch or,
     // in the case of closures, based on the outer context.
     let mut fcx = FnCtxt::new(inherited, param_env, body.value.hir_id);
     *fcx.ps.borrow_mut() = UnsafetyState::function(fn_sig.unsafety, fn_id);
index 28574c68e941a9eaf4c93fc256ea1fea2a288d71..146fc04bc27cbf9fba34ce1533f03bcc16f98e92 100644 (file)
@@ -40,7 +40,7 @@ pub fn resolve_type_vars_in_body(
         let item_def_id = self.tcx.hir().local_def_id(item_id);
 
         // This attribute causes us to dump some writeback information
-        // in the form of errors, which is uSymbolfor unit tests.
+        // in the form of errors, which is uSymbol for unit tests.
         let rustc_dump_user_substs = self.tcx.has_attr(item_def_id, sym::rustc_dump_user_substs);
 
         let mut wbcx = WritebackCx::new(self, body, rustc_dump_user_substs);