]> git.lizzy.rs Git - rust.git/commitdiff
Tweak comments per eddyb's suggestion.
authorNiko Matsakis <niko@alum.mit.edu>
Sun, 1 Feb 2015 01:16:17 +0000 (20:16 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Sun, 1 Feb 2015 11:13:06 +0000 (06:13 -0500)
src/librustc_typeck/check/closure.rs
src/librustc_typeck/check/mod.rs

index 2bbf832fdef01bd72b61d309c1921272e76b6883..808dbd4b319109d331678b40c15b71b1ca451d21 100644 (file)
@@ -42,7 +42,8 @@ pub fn check_expr_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
             // If users didn't specify what sort of closure they want,
             // examine the expected type. For now, if we see explicit
             // evidence than an unboxed closure is desired, we'll use
-            // that, otherwise we'll error, requesting an annotation.
+            // that. Otherwise, we leave it unspecified, to be filled
+            // in by upvar inference.
             match expected_sig_and_kind {
                 None => { // don't have information about the kind, request explicit annotation
                     check_closure(fcx, expr, None, decl, body, None);
index 0aad1f99ce8f22b77589ef1966a0d7a4a47c20ce..268e61b994e14b4b2c18e5eb8434529fdd6502e9 100644 (file)
@@ -177,7 +177,7 @@ pub struct Inherited<'a, 'tcx: 'a> {
     // we may not have decided yet whether `c` is a `Fn`, `FnMut`, or
     // `FnOnce` closure. In that case, we defer full resolution of the
     // call until upvar inference can kick in and make the
-    // decision. We keep these deferred resolutions sorted by the
+    // decision. We keep these deferred resolutions grouped by the
     // def-id of the closure, so that once we decide, we can easily go
     // back and process them.
     deferred_call_resolutions: RefCell<DefIdMap<Vec<DeferredCallResolutionHandler<'tcx>>>>,