diff options
| author | Jonathan Turner <jonathandturner@users.noreply.github.com> | 2016-08-17 06:25:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-17 06:25:24 -0700 |
| commit | a9e3cffde1fa0bbe61cd9d34f2a9c45c78249738 (patch) | |
| tree | 6e35242ccfbb9138f599d9ad01e4e8982e94154e | |
| parent | b444ac69c06930136dfeb05813dcda49c7e82d62 (diff) | |
| parent | 19a33371eb0dca0e53c7332e87e728e19e5206ac (diff) | |
| download | rust-a9e3cffde1fa0bbe61cd9d34f2a9c45c78249738.tar.gz rust-a9e3cffde1fa0bbe61cd9d34f2a9c45c78249738.zip | |
Rollup merge of #35660 - terrynsun:e0207, r=jonathandturner
Update E0207 label to report parameter type Fixes #35642. r? @jonathandturner (Is this okay? I tagged you since it's a simple error fix similar to the other update ones.)
| -rw-r--r-- | src/librustc_typeck/collect.rs | 3 | ||||
| -rw-r--r-- | 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 ed406b9379e..7e1fb32881d 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -2236,7 +2236,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 43ff085a4fa..fbddb81d7c7 100644 --- a/src/test/compile-fail/E0207.rs +++ b/src/test/compile-fail/E0207.rs @@ -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() } |
