Skip to content

Commit 0286bc3

Browse files
committed
doc: Be more specific about how to box closures
1 parent 06c6b3c commit 0286bc3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5151,8 +5151,7 @@ pub fn note_and_explain_type_err<'tcx>(cx: &ctxt<'tcx>, err: &type_err<'tcx>, sp
51515151
if expected_str == found_str && expected_str == "closure" {
51525152
cx.sess.span_note(sp, &format!("no two closures, even if identical, have the same \
51535153
type"));
5154-
cx.sess.span_help(sp, &format!("consider boxing your closure and/or \
5155-
using it as a trait object"));
5154+
cx.sess.span_help(sp, &format!("consider boxing your closure as a trait object"));
51565155
}
51575156
}
51585157
_ => {}

0 commit comments

Comments
 (0)