diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 8329d3eeed9..fd8bd37e478 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -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(); } diff --git a/src/test/compile-fail/E0089.rs b/src/test/compile-fail/E0089.rs index 9ce36523709..b767f129b72 100644 --- a/src/test/compile-fail/E0089.rs +++ b/src/test/compile-fail/E0089.rs @@ -11,7 +11,6 @@ fn foo() {} fn main() { - foo::(); -//~^ ERROR E0089 -//~| NOTE expected 2 type parameters + foo::(); //~ ERROR expected 2 parameters, found 1 parameter [E0089] + //~| NOTE expected 2 type parameters }