Update E0207 to use struct_span_err, add span_label

This commit is contained in:
Shantanu Raj 2016-08-05 17:14:47 +05:30
parent 41fe4b7195
commit bc258791eb

View File

@ -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();
}