diff options
| author | Terry Sun <terrynsun@gmail.com> | 2016-08-13 21:57:13 -0400 |
|---|---|---|
| committer | Terry Sun <terrynsun@gmail.com> | 2016-08-13 21:57:13 -0400 |
| commit | 19a33371eb0dca0e53c7332e87e728e19e5206ac (patch) | |
| tree | 2c4821afba0b2d3f97c8663140358b083c5498b9 | |
| parent | 2b7ea14cc492fa010f8a914044faebd6c27333ab (diff) | |
| download | rust-19a33371eb0dca0e53c7332e87e728e19e5206ac.tar.gz rust-19a33371eb0dca0e53c7332e87e728e19e5206ac.zip | |
Update E0207 label to report parameter type
Fixes #35642.
| -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 75bfad053a3..bc755821fba 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 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() } |
