From 79af27762324f28ab13335864111071b8708ea39 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 5 Jan 2015 12:07:49 -0500 Subject: [PATCH] address Niko's comments --- src/librustc_typeck/check/closure.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/check/closure.rs b/src/librustc_typeck/check/closure.rs index 7671ad36971..9945e264bfc 100644 --- a/src/librustc_typeck/check/closure.rs +++ b/src/librustc_typeck/check/closure.rs @@ -45,14 +45,14 @@ pub fn check_expr_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, // that, otherwise we'll fall back to boxed closures. match expected_sig_and_kind { None => { // don't have information about the kind, request explicit annotation - // HACK We still need to typeck the body, so assume `FnMut` kind just for that + // NB We still need to typeck the body, so assume `FnMut` kind just for that let kind = ty::FnMutUnboxedClosureKind; check_unboxed_closure(fcx, expr, kind, decl, body, None); fcx.ccx.tcx.sess.span_err( expr.span, - "Can't infer the \"kind\" of the closure, explicitly annotate it. e.g. \ + "can't infer the \"kind\" of the closure, explicitly annotate it. e.g. \ `|&:| {}`"); }, Some((sig, kind)) => {