@@ -89,18 +89,18 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
8989 let data = db. function_data ( func) ;
9090 let body = db. body ( func. into ( ) ) ;
9191
92- // 1. Recursively validate inner scope items, such as static variables and constants.
92+ // Recursively validate inner scope items, such as static variables and constants.
9393 for ( item_id, _) in body. item_scope . values ( ) {
9494 let mut validator = DeclValidator :: new ( item_id, self . sink ) ;
9595 validator. validate_item ( db) ;
9696 }
9797
98- // 2. Check whether non-snake case identifiers are allowed for this function.
98+ // Check whether non-snake case identifiers are allowed for this function.
9999 if self . allowed ( db, func. into ( ) , allow:: NON_SNAKE_CASE ) {
100100 return ;
101101 }
102102
103- // 2. Check the function name.
103+ // Check the function name.
104104 let function_name = data. name . to_string ( ) ;
105105 let fn_name_replacement = if let Some ( new_name) = to_lower_snake_case ( & function_name) {
106106 let replacement = Replacement {
@@ -113,7 +113,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
113113 None
114114 } ;
115115
116- // 3. Check the param names.
116+ // Check the param names.
117117 let mut fn_param_replacements = Vec :: new ( ) ;
118118
119119 for pat_id in body. params . iter ( ) . cloned ( ) {
@@ -135,7 +135,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
135135 }
136136 }
137137
138- // 4. Check the patterns inside the function body.
138+ // Check the patterns inside the function body.
139139 let mut pats_replacements = Vec :: new ( ) ;
140140
141141 for ( pat_idx, pat) in body. pats . iter ( ) {
@@ -160,7 +160,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
160160 }
161161 }
162162
163- // 5. If there is at least one element to spawn a warning on, go to the source map and generate a warning.
163+ // If there is at least one element to spawn a warning on, go to the source map and generate a warning.
164164 self . create_incorrect_case_diagnostic_for_func (
165165 func,
166166 db,
@@ -187,7 +187,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
187187 let fn_loc = func. lookup ( db. upcast ( ) ) ;
188188 let fn_src = fn_loc. source ( db. upcast ( ) ) ;
189189
190- // 1. Diagnostic for function name.
190+ // Diagnostic for function name.
191191 if let Some ( replacement) = fn_name_replacement {
192192 let ast_ptr = match fn_src. value . name ( ) {
193193 Some ( name) => name,
@@ -214,7 +214,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
214214 self . sink . push ( diagnostic) ;
215215 }
216216
217- // 2. Diagnostics for function params.
217+ // Diagnostics for function params.
218218 let fn_params_list = match fn_src. value . param_list ( ) {
219219 Some ( params) => params,
220220 None => {
@@ -334,7 +334,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
334334 self . allowed ( db, struct_id. into ( ) , allow:: NON_CAMEL_CASE_TYPES ) ;
335335 let non_snake_case_allowed = self . allowed ( db, struct_id. into ( ) , allow:: NON_SNAKE_CASE ) ;
336336
337- // 1. Check the structure name.
337+ // Check the structure name.
338338 let struct_name = data. name . to_string ( ) ;
339339 let struct_name_replacement = if let Some ( new_name) = to_camel_case ( & struct_name) {
340340 let replacement = Replacement {
@@ -351,7 +351,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
351351 None
352352 } ;
353353
354- // 2. Check the field names.
354+ // Check the field names.
355355 let mut struct_fields_replacements = Vec :: new ( ) ;
356356
357357 if !non_snake_case_allowed {
@@ -370,7 +370,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
370370 }
371371 }
372372
373- // 3. If there is at least one element to spawn a warning on, go to the source map and generate a warning.
373+ // If there is at least one element to spawn a warning on, go to the source map and generate a warning.
374374 self . create_incorrect_case_diagnostic_for_struct (
375375 struct_id,
376376 db,
@@ -470,12 +470,12 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
470470 fn validate_enum ( & mut self , db : & dyn HirDatabase , enum_id : EnumId ) {
471471 let data = db. enum_data ( enum_id) ;
472472
473- // 1. Check whether non-camel case names are allowed for this enum.
473+ // Check whether non-camel case names are allowed for this enum.
474474 if self . allowed ( db, enum_id. into ( ) , allow:: NON_CAMEL_CASE_TYPES ) {
475475 return ;
476476 }
477477
478- // 2. Check the enum name.
478+ // Check the enum name.
479479 let enum_name = data. name . to_string ( ) ;
480480 let enum_name_replacement = if let Some ( new_name) = to_camel_case ( & enum_name) {
481481 let replacement = Replacement {
@@ -488,7 +488,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
488488 None
489489 } ;
490490
491- // 3. Check the field names.
491+ // Check the field names.
492492 let mut enum_fields_replacements = Vec :: new ( ) ;
493493
494494 for ( _, variant) in data. variants . iter ( ) {
@@ -503,7 +503,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
503503 }
504504 }
505505
506- // 4. If there is at least one element to spawn a warning on, go to the source map and generate a warning.
506+ // If there is at least one element to spawn a warning on, go to the source map and generate a warning.
507507 self . create_incorrect_case_diagnostic_for_enum (
508508 enum_id,
509509 db,
0 commit comments