Skip to content

Commit 970e76c

Browse files
author
Jonathan Turner
authored
Rollup merge of rust-lang#35660 - terrynsun:e0207, r=jonathandturner
Update E0207 label to report parameter type Fixes rust-lang#35642. r? @jonathandturner (Is this okay? I tagged you since it's a simple error fix similar to the other update ones.)
2 parents 3431696 + 19a3337 commit 970e76c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)