diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index daac669e65..5b0dda634f 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -208,7 +208,8 @@ pub struct MismatchedArgCount { impl Diagnostic for MismatchedArgCount { fn message(&self) -> String { - format!("Expected {} arguments, found {}", self.expected, self.found) + let s = if self.expected == 1 { "" } else { "s" }; + format!("Expected {} argument{}, found {}", self.expected, s, self.found) } fn source(&self) -> InFile { InFile { file_id: self.file, value: self.call_expr.clone().into() }