From 159922de93bd0437093f9ca07eda4673ba285b89 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 31 May 2021 19:09:44 +0300 Subject: minor: it's Parameter, not Argument --- crates/hir_ty/src/diagnostics.rs | 4 ++-- crates/hir_ty/src/diagnostics/decl_check.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty') diff --git a/crates/hir_ty/src/diagnostics.rs b/crates/hir_ty/src/diagnostics.rs index 7598e2193..283894704 100644 --- a/crates/hir_ty/src/diagnostics.rs +++ b/crates/hir_ty/src/diagnostics.rs @@ -349,11 +349,11 @@ impl fmt::Display for CaseType { #[derive(Debug)] pub enum IdentType { - Argument, Constant, Enum, Field, Function, + Parameter, StaticVariable, Structure, Variable, @@ -363,11 +363,11 @@ pub enum IdentType { impl fmt::Display for IdentType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let repr = match self { - IdentType::Argument => "Argument", IdentType::Constant => "Constant", IdentType::Enum => "Enum", IdentType::Field => "Field", IdentType::Function => "Function", + IdentType::Parameter => "Parameter", IdentType::StaticVariable => "Static variable", IdentType::Structure => "Structure", IdentType::Variable => "Variable", diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs index bfa53bdce..cfb5d7320 100644 --- a/crates/hir_ty/src/diagnostics/decl_check.rs +++ b/crates/hir_ty/src/diagnostics/decl_check.rs @@ -256,7 +256,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> { } let ident_type = - if is_param { IdentType::Argument } else { IdentType::Variable }; + if is_param { IdentType::Parameter } else { IdentType::Variable }; let diagnostic = IncorrectCase { file: source_ptr.file_id, @@ -643,10 +643,10 @@ fn NonSnakeCaseName() {} check_diagnostics( r#" fn foo(SomeParam: u8) {} - // ^^^^^^^^^ Argument `SomeParam` should have snake_case name, e.g. `some_param` + // ^^^^^^^^^ Parameter `SomeParam` should have snake_case name, e.g. `some_param` fn foo2(ok_param: &str, CAPS_PARAM: u8) {} - // ^^^^^^^^^^ Argument `CAPS_PARAM` should have snake_case name, e.g. `caps_param` + // ^^^^^^^^^^ Parameter `CAPS_PARAM` should have snake_case name, e.g. `caps_param` "#, ); } -- cgit v1.2.3