Skip to content

Commit

Permalink
doc: Be more specific about how to box closures
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Jun 4, 2015
1 parent 06c6b3c commit 0286bc3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5151,8 +5151,7 @@ pub fn note_and_explain_type_err<'tcx>(cx: &ctxt<'tcx>, err: &type_err<'tcx>, sp
if expected_str == found_str && expected_str == "closure" {
cx.sess.span_note(sp, &format!("no two closures, even if identical, have the same \
type"));
cx.sess.span_help(sp, &format!("consider boxing your closure and/or \
using it as a trait object"));
cx.sess.span_help(sp, &format!("consider boxing your closure as a trait object"));
}
}
_ => {}
Expand Down

0 comments on commit 0286bc3

Please sign in to comment.