Skip to content

Commit

Permalink
Rollup merge of rust-lang#35660 - terrynsun:e0207, r=jonathandturner
Browse files Browse the repository at this point in the history
Update E0207 label to report parameter type

Fixes rust-lang#35642.

r? @jonathandturner (Is this okay? I tagged you since it's a simple error fix similar to the other update ones.)
  • Loading branch information
Jonathan Turner authored Aug 17, 2016
2 parents 568aee4 + 19a3337 commit d4eb803
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 @@ -2321,7 +2321,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 d4eb803

Please sign in to comment.