From 19a33371eb0dca0e53c7332e87e728e19e5206ac Mon Sep 17 00:00:00 2001 From: Terry Sun Date: Sat, 13 Aug 2016 21:57:13 -0400 Subject: [PATCH] Update E0207 label to report parameter type Fixes #35642. --- src/librustc_typeck/collect.rs | 3 +-- src/test/compile-fail/E0207.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 75bfad053a32..bc755821fba4 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -2323,7 +2323,6 @@ fn report_unused_parameter(ccx: &CrateCtxt, "the {} parameter `{}` is not constrained by the \ impl trait, self type, or predicates", kind, name) - .span_label(span, &format!("unconstrained lifetime parameter")) + .span_label(span, &format!("unconstrained {} parameter", kind)) .emit(); - } diff --git a/src/test/compile-fail/E0207.rs b/src/test/compile-fail/E0207.rs index 43ff085a4fa8..fbddb81d7c70 100644 --- a/src/test/compile-fail/E0207.rs +++ b/src/test/compile-fail/E0207.rs @@ -11,7 +11,7 @@ struct Foo; impl Foo { //~ ERROR E0207 - //~| NOTE unconstrained lifetime parameter + //~| NOTE unconstrained type parameter fn get(&self) -> T { ::default() }