@@ -1161,7 +1161,7 @@ impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
11611161 fn assign ( & mut self , span : Span , nid : hir:: HirId , ty_opt : Option < LocalTy < ' tcx > > ) -> Ty < ' tcx > {
11621162 match ty_opt {
11631163 None => {
1164- // infer the variable's type
1164+ // Infer the variable's type.
11651165 let var_ty = self . fcx . next_ty_var ( TypeVariableOrigin {
11661166 kind : TypeVariableOriginKind :: TypeInference ,
11671167 span,
@@ -1173,7 +1173,7 @@ impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
11731173 var_ty
11741174 }
11751175 Some ( typ) => {
1176- // take type that the user specified
1176+ // Take type that the user specified.
11771177 self . fcx . locals . borrow_mut ( ) . insert ( nid, typ) ;
11781178 typ. revealed_ty
11791179 }
@@ -1244,7 +1244,7 @@ impl<'a, 'tcx> Visitor<'tcx> for GatherLocalsVisitor<'a, 'tcx> {
12441244 intravisit:: walk_pat ( self , p) ;
12451245 }
12461246
1247- // Don't descend into the bodies of nested closures
1247+ // Don't descend into the bodies of nested closures.
12481248 fn visit_fn (
12491249 & mut self ,
12501250 _: intravisit:: FnKind < ' tcx > ,
@@ -1292,7 +1292,7 @@ fn check_fn<'a, 'tcx>(
12921292
12931293 debug ! ( "check_fn(sig={:?}, fn_id={}, param_env={:?})" , fn_sig, fn_id, param_env) ;
12941294
1295- // Create the function context. This is either derived from scratch or,
1295+ // Create the function context. This is either derived from scratch or,
12961296 // in the case of closures, based on the outer context.
12971297 let mut fcx = FnCtxt :: new ( inherited, param_env, body. value . hir_id ) ;
12981298 * fcx. ps . borrow_mut ( ) = UnsafetyState :: function ( fn_sig. unsafety , fn_id) ;
0 commit comments