diff options
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index daac669e6..5b0dda634 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs | |||
@@ -208,7 +208,8 @@ pub struct MismatchedArgCount { | |||
208 | 208 | ||
209 | impl Diagnostic for MismatchedArgCount { | 209 | impl Diagnostic for MismatchedArgCount { |
210 | fn message(&self) -> String { | 210 | fn message(&self) -> String { |
211 | format!("Expected {} arguments, found {}", self.expected, self.found) | 211 | let s = if self.expected == 1 { "" } else { "s" }; |
212 | format!("Expected {} argument{}, found {}", self.expected, s, self.found) | ||
212 | } | 213 | } |
213 | fn source(&self) -> InFile<SyntaxNodePtr> { | 214 | fn source(&self) -> InFile<SyntaxNodePtr> { |
214 | InFile { file_id: self.file, value: self.call_expr.clone().into() } | 215 | InFile { file_id: self.file, value: self.call_expr.clone().into() } |