diff options
| author | Shantanu Raj <s@sraj.me> | 2016-08-05 17:14:47 +0530 |
|---|---|---|
| committer | Shantanu Raj <s@sraj.me> | 2016-08-05 17:14:47 +0530 |
| commit | bc258791eb4cc5802c261afc2b923b2875c0736d (patch) | |
| tree | 800f0a5ed4a1a248b000dbea4e42ce2e3cd90076 | |
| parent | 41fe4b719538d2505a75cf9c065ec12411b94ac5 (diff) | |
Update E0207 to use struct_span_err, add span_label
| -rw-r--r-- | src/librustc_typeck/collect.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 4486748a1f0..dfffe3a4a90 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -2314,8 +2314,12 @@ fn report_unused_parameter(ccx: &CrateCtxt, kind: &str, name: &str) { - span_err!(ccx.tcx.sess, span, E0207, - "the {} parameter `{}` is not constrained by the \ - impl trait, self type, or predicates", - kind, name); + struct_span_err!( + ccx.tcx.sess, span, E0207, + "the {} parameter `{}` is not constrained by the \ + impl trait, self type, or predicates", + kind, name) + .span_label(span, &format!("unconstrained lifetime parameter")) + .emit(); + } |
