Update E0207 label to report parameter type

Fixes #35642.
This commit is contained in:
Terry Sun 2016-08-13 21:57:13 -04:00
parent 2b7ea14cc4
commit 19a33371eb
2 changed files with 2 additions and 3 deletions

View File

@ -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();
}

View File

@ -11,7 +11,7 @@
struct Foo;
impl<T: Default> Foo { //~ ERROR E0207
//~| NOTE unconstrained lifetime parameter
//~| NOTE unconstrained type parameter
fn get(&self) -> T {
<T as Default>::default()
}