From 52e520e902cecc579910e6cabe1658720bfab132 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Thu, 30 Apr 2015 00:56:33 +0200 Subject: [PATCH] rustc: Improve misleading error message for E0282 The error can also occur in cases where a type annotation will not help. --- src/librustc/middle/traits/error_reporting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/middle/traits/error_reporting.rs b/src/librustc/middle/traits/error_reporting.rs index d10ff060418c..9f87a9ad65f3 100644 --- a/src/librustc/middle/traits/error_reporting.rs +++ b/src/librustc/middle/traits/error_reporting.rs @@ -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,