rustc: Improve misleading error message for E0282

The error can also occur in cases where a type annotation will not help.
This commit is contained in:
Ruud van Asseldonk 2015-04-30 00:56:33 +02:00
parent 551a74dddd
commit 52e520e902

View file

@ -290,7 +290,7 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
{
span_err!(infcx.tcx.sess, obligation.cause.span, E0282,
"unable to infer enough type information about `{}`; \
type annotations required",
type annotations or generic parameter binding required",
self_ty.user_string(infcx.tcx));
} else {
span_err!(infcx.tcx.sess, obligation.cause.span, E0283,