Skip to content

Commit

Permalink
Update E0207 label to report parameter type
Browse files Browse the repository at this point in the history
Fixes #35642.
  • Loading branch information
terrynsun committed Aug 14, 2016
1 parent 2b7ea14 commit 19a3337
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

}
2 changes: 1 addition & 1 deletion src/test/compile-fail/E0207.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 19a3337

Please sign in to comment.