Skip to content

Commit bc25879

Browse files
committed
Update E0207 to use struct_span_err, add span_label
1 parent 41fe4b7 commit bc25879

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/librustc_typeck/collect.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,8 +2314,12 @@ fn report_unused_parameter(ccx: &CrateCtxt,
23142314
kind: &str,
23152315
name: &str)
23162316
{
2317-
span_err!(ccx.tcx.sess, span, E0207,
2318-
"the {} parameter `{}` is not constrained by the \
2319-
impl trait, self type, or predicates",
2320-
kind, name);
2317+
struct_span_err!(
2318+
ccx.tcx.sess, span, E0207,
2319+
"the {} parameter `{}` is not constrained by the \
2320+
impl trait, self type, or predicates",
2321+
kind, name)
2322+
.span_label(span, &format!("unconstrained lifetime parameter"))
2323+
.emit();
2324+
23212325
}

0 commit comments

Comments
 (0)