Skip to content

Commit 159922d

Browse files
committed
minor: it's Parameter, not Argument
1 parent 341f8bb commit 159922d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/hir_ty/src/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,11 @@ impl fmt::Display for CaseType {
349349

350350
#[derive(Debug)]
351351
pub enum IdentType {
352-
Argument,
353352
Constant,
354353
Enum,
355354
Field,
356355
Function,
356+
Parameter,
357357
StaticVariable,
358358
Structure,
359359
Variable,
@@ -363,11 +363,11 @@ pub enum IdentType {
363363
impl fmt::Display for IdentType {
364364
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
365365
let repr = match self {
366-
IdentType::Argument => "Argument",
367366
IdentType::Constant => "Constant",
368367
IdentType::Enum => "Enum",
369368
IdentType::Field => "Field",
370369
IdentType::Function => "Function",
370+
IdentType::Parameter => "Parameter",
371371
IdentType::StaticVariable => "Static variable",
372372
IdentType::Structure => "Structure",
373373
IdentType::Variable => "Variable",

crates/hir_ty/src/diagnostics/decl_check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
256256
}
257257

258258
let ident_type =
259-
if is_param { IdentType::Argument } else { IdentType::Variable };
259+
if is_param { IdentType::Parameter } else { IdentType::Variable };
260260

261261
let diagnostic = IncorrectCase {
262262
file: source_ptr.file_id,
@@ -643,10 +643,10 @@ fn NonSnakeCaseName() {}
643643
check_diagnostics(
644644
r#"
645645
fn foo(SomeParam: u8) {}
646-
// ^^^^^^^^^ Argument `SomeParam` should have snake_case name, e.g. `some_param`
646+
// ^^^^^^^^^ Parameter `SomeParam` should have snake_case name, e.g. `some_param`
647647
648648
fn foo2(ok_param: &str, CAPS_PARAM: u8) {}
649-
// ^^^^^^^^^^ Argument `CAPS_PARAM` should have snake_case name, e.g. `caps_param`
649+
// ^^^^^^^^^^ Parameter `CAPS_PARAM` should have snake_case name, e.g. `caps_param`
650650
"#,
651651
);
652652
}

0 commit comments

Comments
 (0)