parent
717ac960b5
commit
79d32e9948
@ -4566,14 +4566,11 @@ fn check_path_parameter_count(&self,
|
||||
} else if !infer_types && types.len() < required_len {
|
||||
let adjust = |len| if len > 1 { "parameters" } else { "parameter" };
|
||||
let required_param_str = adjust(required_len);
|
||||
let actual_param_str = adjust(types.len());
|
||||
struct_span_err!(self.tcx.sess, span, E0089,
|
||||
"too few type parameters provided: \
|
||||
expected {} {}, found {} {}",
|
||||
expected {}, found {}",
|
||||
count(required_len),
|
||||
required_param_str,
|
||||
count(types.len()),
|
||||
actual_param_str)
|
||||
count(types.len()))
|
||||
.span_label(span, &format!("expected {} type {}", required_len, required_param_str))
|
||||
.emit();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
fn foo<T, U>() {}
|
||||
|
||||
fn main() {
|
||||
foo::<f64>();
|
||||
//~^ ERROR E0089
|
||||
//~| NOTE expected 2 type parameters
|
||||
foo::<f64>(); //~ ERROR expected 2 parameters, found 1 parameter [E0089]
|
||||
//~| NOTE expected 2 type parameters
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user