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. \
- `|&:| {}`");
+ span_err!(fcx.ccx.tcx.sess, expr.span, E0187,
+ "can't infer the \"kind\" of the closure; explicitly annotate it; e.g. \
+ `|&:| {{}}`");
},
Some((sig, kind)) => {
check_unboxed_closure(fcx, expr, kind, decl, body, Some(sig));