mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add checks for function parameters
This commit is contained in:
parent
4039176ec6
commit
f5cea35986
2 changed files with 94 additions and 7 deletions
|
@ -269,6 +269,7 @@ pub struct IncorrectCase {
|
|||
pub file: HirFileId,
|
||||
pub ident: SyntaxNodePtr,
|
||||
pub expected_case: CaseType,
|
||||
pub ident_type: String,
|
||||
pub ident_text: String,
|
||||
pub suggested_text: String,
|
||||
}
|
||||
|
@ -280,7 +281,8 @@ impl Diagnostic for IncorrectCase {
|
|||
|
||||
fn message(&self) -> String {
|
||||
format!(
|
||||
"Argument `{}` should have a {} name, e.g. `{}`",
|
||||
"{} `{}` should have a {} name, e.g. `{}`",
|
||||
self.ident_type,
|
||||
self.ident_text,
|
||||
self.expected_case.to_string(),
|
||||
self.suggested_text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue