Skip to content

Commit 19a3337

Browse files
committed
Update E0207 label to report parameter type
Fixes #35642.
1 parent 2b7ea14 commit 19a3337

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc_typeck/collect.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,6 @@ fn report_unused_parameter(ccx: &CrateCtxt,
23232323
"the {} parameter `{}` is not constrained by the \
23242324
impl trait, self type, or predicates",
23252325
kind, name)
2326-
.span_label(span, &format!("unconstrained lifetime parameter"))
2326+
.span_label(span, &format!("unconstrained {} parameter", kind))
23272327
.emit();
2328-
23292328
}

src/test/compile-fail/E0207.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
struct Foo;
1212

1313
impl<T: Default> Foo { //~ ERROR E0207
14-
//~| NOTE unconstrained lifetime parameter
14+
//~| NOTE unconstrained type parameter
1515
fn get(&self) -> T {
1616
<T as Default>::default()
1717
}

0 commit comments

Comments
 (0)