Skip to content

Commit a9e3cff

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 b444ac6 + 19a3337 commit a9e3cff

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: src/librustc_typeck/collect.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,6 @@ fn report_unused_parameter(ccx: &CrateCtxt,
22362236
"the {} parameter `{}` is not constrained by the \
22372237
impl trait, self type, or predicates",
22382238
kind, name)
2239-
.span_label(span, &format!("unconstrained lifetime parameter"))
2239+
.span_label(span, &format!("unconstrained {} parameter", kind))
22402240
.emit();
2241-
22422241
}

Diff for: 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)