From bc258791eb4cc5802c261afc2b923b2875c0736d Mon Sep 17 00:00:00 2001 From: Shantanu Raj Date: Fri, 5 Aug 2016 17:14:47 +0530 Subject: [PATCH] Update E0207 to use struct_span_err, add span_label --- src/librustc_typeck/collect.rs | 12 ++++++++---- 1 file 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(); + }