Skip to content

Commit ff96b56

Browse files
author
Adam Medziński
committed
Updated E0282 to new requirements
1 parent eaa2697 commit ff96b56

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/librustc/traits/error_reporting.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,11 +871,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
871871

872872
fn need_type_info(&self, span: Span, ty: Ty<'tcx>) {
873873
let mut err = struct_span_err!(self.tcx.sess, span, E0282,
874-
"unable to infer enough type information about `{}`; \
875-
type annotations or generic parameter binding required",
874+
"unable to infer enough type information about `{}`",
876875
ty);
877876
err.note("type annotations or generic parameter binding required");
878-
err.span_label(span, &format!("cannot infer type about `{}`", ty));
877+
err.span_label(span, &format!("cannot infer type for `{}`", ty));
879878
err.emit()
880879
}
881880

src/test/compile-fail/issue-23041.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ fn main()
1414
fn bar(x:i32) ->i32 { 3*x };
1515
let b:Box<Any> = Box::new(bar as fn(_)->_);
1616
b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
17-
//~| NOTE cannot infer type about `_`
17+
//~| NOTE cannot infer type for `_`
1818
//~| NOTE type annotations or generic parameter binding required
1919
}

0 commit comments

Comments
 (0)