]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/closure.rs
Various minor/cosmetic improvements to code
[rust.git] / src / librustc_typeck / check / closure.rs
index 10ac2448d007b01c73d65dd33f2bcdce8dbac6fe..be15503e47906e7e68ba5452b51010627f453628 100644 (file)
@@ -64,7 +64,7 @@ pub fn check_expr_closure(
             Some(ty) => self.deduce_expectations_from_expected_type(ty),
             None => (None, None),
         };
-        let body = self.tcx.hir.body(body_id);
+        let body = self.tcx.hir().body(body_id);
         self.check_closure(expr, expected_kind, decl, body, gen, expected_sig)
     }
 
@@ -82,7 +82,7 @@ fn check_closure(
             opt_kind, expected_sig
         );
 
-        let expr_def_id = self.tcx.hir.local_def_id(expr.id);
+        let expr_def_id = self.tcx.hir().local_def_id(expr.id);
 
         let ClosureSignatures {
             bound_sig,
@@ -266,7 +266,7 @@ fn deduce_expectations_from_obligations(
                     ty::Predicate::ObjectSafe(..) => None,
                     ty::Predicate::ConstEvaluatable(..) => None,
 
-                    // NB: This predicate is created by breaking down a
+                    // N.B., this predicate is created by breaking down a
                     // `ClosureType: FnFoo()` predicate, where
                     // `ClosureType` represents some `Closure`. It can't
                     // possibly be referring to the current closure,
@@ -496,7 +496,7 @@ fn sig_of_closure_with_mismatched_number_of_arguments(
         body: &hir::Body,
         expected_sig: ExpectedSig<'tcx>,
     ) -> ClosureSignatures<'tcx> {
-        let expr_map_node = self.tcx.hir.get_if_local(expr_def_id).unwrap();
+        let expr_map_node = self.tcx.hir().get_if_local(expr_def_id).unwrap();
         let expected_args: Vec<_> = expected_sig
             .sig
             .inputs()