aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics.rs
diff options
context:
space:
mode:
authorIgor Aleksanov <[email protected]>2020-10-03 11:39:10 +0100
committerIgor Aleksanov <[email protected]>2020-10-12 08:59:54 +0100
commitf5cea35986a0c8182ca427f10e20bc97ec564315 (patch)
tree80179332f09f6ad3bde913c9b6814ef2f2159dec /crates/hir_ty/src/diagnostics.rs
parent4039176ec63e5c75d76398f2debe26ac6fa59cbc (diff)
Add checks for function parameters
Diffstat (limited to 'crates/hir_ty/src/diagnostics.rs')
-rw-r--r--crates/hir_ty/src/diagnostics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_ty/src/diagnostics.rs b/crates/hir_ty/src/diagnostics.rs
index 7227e7010..24fff690a 100644
--- a/crates/hir_ty/src/diagnostics.rs
+++ b/crates/hir_ty/src/diagnostics.rs
@@ -269,6 +269,7 @@ pub struct IncorrectCase {
269 pub file: HirFileId, 269 pub file: HirFileId,
270 pub ident: SyntaxNodePtr, 270 pub ident: SyntaxNodePtr,
271 pub expected_case: CaseType, 271 pub expected_case: CaseType,
272 pub ident_type: String,
272 pub ident_text: String, 273 pub ident_text: String,
273 pub suggested_text: String, 274 pub suggested_text: String,
274} 275}
@@ -280,7 +281,8 @@ impl Diagnostic for IncorrectCase {
280 281
281 fn message(&self) -> String { 282 fn message(&self) -> String {
282 format!( 283 format!(
283 "Argument `{}` should have a {} name, e.g. `{}`", 284 "{} `{}` should have a {} name, e.g. `{}`",
285 self.ident_type,
284 self.ident_text, 286 self.ident_text,
285 self.expected_case.to_string(), 287 self.expected_case.to_string(),
286 self.suggested_text 288 self.suggested_text