mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-10 19:16:51 +00:00
parent
2b7ea14cc4
commit
19a33371eb
@ -2323,7 +2323,6 @@ fn report_unused_parameter(ccx: &CrateCtxt,
|
||||
"the {} parameter `{}` is not constrained by the \
|
||||
impl trait, self type, or predicates",
|
||||
kind, name)
|
||||
.span_label(span, &format!("unconstrained lifetime parameter"))
|
||||
.span_label(span, &format!("unconstrained {} parameter", kind))
|
||||
.emit();
|
||||
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
struct Foo;
|
||||
|
||||
impl<T: Default> Foo { //~ ERROR E0207
|
||||
//~| NOTE unconstrained lifetime parameter
|
||||
//~| NOTE unconstrained type parameter
|
||||
fn get(&self) -> T {
|
||||
<T as Default>::default()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user