aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-07-09 14:50:53 +0100
committerJonas Schievink <[email protected]>2020-07-09 14:50:53 +0100
commitd04f3604d5b054674720276900ebc35564e2df96 (patch)
tree0d3ea9cfb983fa9e4d8887d9a4a9647b5e073945 /crates/ra_hir_ty
parent73327c647dfdc36fb550967271d12db16978c5d6 (diff)
Correctly pluralize message
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs3
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
209impl Diagnostic for MismatchedArgCount { 209impl 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() }