aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/decl_check.rs
diff options
context:
space:
mode:
authorMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
committerMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
commit966c23f5290275ce17564f6027a17ec20cd6078f (patch)
tree9e977a29eaf10d1733340563ef31fda064e37400 /crates/hir_ty/src/diagnostics/decl_check.rs
parent83e6940efb42675226adb8d2856c095b8dce36c5 (diff)
avoid converting types into themselves via .into() (clippy::useless-conversion)
example: let x: String = String::from("hello world").into();
Diffstat (limited to 'crates/hir_ty/src/diagnostics/decl_check.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/decl_check.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs
index 982ad5b9e..bfe239793 100644
--- a/crates/hir_ty/src/diagnostics/decl_check.rs
+++ b/crates/hir_ty/src/diagnostics/decl_check.rs
@@ -203,7 +203,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
203 let diagnostic = IncorrectCase { 203 let diagnostic = IncorrectCase {
204 file: fn_src.file_id, 204 file: fn_src.file_id,
205 ident_type: IdentType::Function, 205 ident_type: IdentType::Function,
206 ident: AstPtr::new(&ast_ptr).into(), 206 ident: AstPtr::new(&ast_ptr),
207 expected_case: replacement.expected_case, 207 expected_case: replacement.expected_case,
208 ident_text: replacement.current_name.to_string(), 208 ident_text: replacement.current_name.to_string(),
209 suggested_text: replacement.suggested_text, 209 suggested_text: replacement.suggested_text,
@@ -261,7 +261,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
261 let diagnostic = IncorrectCase { 261 let diagnostic = IncorrectCase {
262 file: fn_src.file_id, 262 file: fn_src.file_id,
263 ident_type: IdentType::Argument, 263 ident_type: IdentType::Argument,
264 ident: AstPtr::new(&ast_ptr).into(), 264 ident: AstPtr::new(&ast_ptr),
265 expected_case: param_to_rename.expected_case, 265 expected_case: param_to_rename.expected_case,
266 ident_text: param_to_rename.current_name.to_string(), 266 ident_text: param_to_rename.current_name.to_string(),
267 suggested_text: param_to_rename.suggested_text, 267 suggested_text: param_to_rename.suggested_text,
@@ -313,7 +313,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
313 let diagnostic = IncorrectCase { 313 let diagnostic = IncorrectCase {
314 file: source_ptr.file_id, 314 file: source_ptr.file_id,
315 ident_type: IdentType::Variable, 315 ident_type: IdentType::Variable,
316 ident: AstPtr::new(&name_ast).into(), 316 ident: AstPtr::new(&name_ast),
317 expected_case: replacement.expected_case, 317 expected_case: replacement.expected_case,
318 ident_text: replacement.current_name.to_string(), 318 ident_text: replacement.current_name.to_string(),
319 suggested_text: replacement.suggested_text, 319 suggested_text: replacement.suggested_text,
@@ -403,7 +403,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
403 let diagnostic = IncorrectCase { 403 let diagnostic = IncorrectCase {
404 file: struct_src.file_id, 404 file: struct_src.file_id,
405 ident_type: IdentType::Structure, 405 ident_type: IdentType::Structure,
406 ident: AstPtr::new(&ast_ptr).into(), 406 ident: AstPtr::new(&ast_ptr),
407 expected_case: replacement.expected_case, 407 expected_case: replacement.expected_case,
408 ident_text: replacement.current_name.to_string(), 408 ident_text: replacement.current_name.to_string(),
409 suggested_text: replacement.suggested_text, 409 suggested_text: replacement.suggested_text,
@@ -448,7 +448,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
448 let diagnostic = IncorrectCase { 448 let diagnostic = IncorrectCase {
449 file: struct_src.file_id, 449 file: struct_src.file_id,
450 ident_type: IdentType::Field, 450 ident_type: IdentType::Field,
451 ident: AstPtr::new(&ast_ptr).into(), 451 ident: AstPtr::new(&ast_ptr),
452 expected_case: field_to_rename.expected_case, 452 expected_case: field_to_rename.expected_case,
453 ident_text: field_to_rename.current_name.to_string(), 453 ident_text: field_to_rename.current_name.to_string(),
454 suggested_text: field_to_rename.suggested_text, 454 suggested_text: field_to_rename.suggested_text,
@@ -527,7 +527,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
527 let diagnostic = IncorrectCase { 527 let diagnostic = IncorrectCase {
528 file: enum_src.file_id, 528 file: enum_src.file_id,
529 ident_type: IdentType::Enum, 529 ident_type: IdentType::Enum,
530 ident: AstPtr::new(&ast_ptr).into(), 530 ident: AstPtr::new(&ast_ptr),
531 expected_case: replacement.expected_case, 531 expected_case: replacement.expected_case,
532 ident_text: replacement.current_name.to_string(), 532 ident_text: replacement.current_name.to_string(),
533 suggested_text: replacement.suggested_text, 533 suggested_text: replacement.suggested_text,
@@ -572,7 +572,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
572 let diagnostic = IncorrectCase { 572 let diagnostic = IncorrectCase {
573 file: enum_src.file_id, 573 file: enum_src.file_id,
574 ident_type: IdentType::Variant, 574 ident_type: IdentType::Variant,
575 ident: AstPtr::new(&ast_ptr).into(), 575 ident: AstPtr::new(&ast_ptr),
576 expected_case: variant_to_rename.expected_case, 576 expected_case: variant_to_rename.expected_case,
577 ident_text: variant_to_rename.current_name.to_string(), 577 ident_text: variant_to_rename.current_name.to_string(),
578 suggested_text: variant_to_rename.suggested_text, 578 suggested_text: variant_to_rename.suggested_text,
@@ -617,7 +617,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
617 let diagnostic = IncorrectCase { 617 let diagnostic = IncorrectCase {
618 file: const_src.file_id, 618 file: const_src.file_id,
619 ident_type: IdentType::Constant, 619 ident_type: IdentType::Constant,
620 ident: AstPtr::new(&ast_ptr).into(), 620 ident: AstPtr::new(&ast_ptr),
621 expected_case: replacement.expected_case, 621 expected_case: replacement.expected_case,
622 ident_text: replacement.current_name.to_string(), 622 ident_text: replacement.current_name.to_string(),
623 suggested_text: replacement.suggested_text, 623 suggested_text: replacement.suggested_text,
@@ -665,7 +665,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
665 let diagnostic = IncorrectCase { 665 let diagnostic = IncorrectCase {
666 file: static_src.file_id, 666 file: static_src.file_id,
667 ident_type: IdentType::StaticVariable, 667 ident_type: IdentType::StaticVariable,
668 ident: AstPtr::new(&ast_ptr).into(), 668 ident: AstPtr::new(&ast_ptr),
669 expected_case: replacement.expected_case, 669 expected_case: replacement.expected_case,
670 ident_text: replacement.current_name.to_string(), 670 ident_text: replacement.current_name.to_string(),
671 suggested_text: replacement.suggested_text, 671 suggested_text: replacement.suggested_text,