From 50a147dcdfd0df462f0c24e5d7bcfe60abadac32 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Sun, 4 Oct 2020 09:12:00 +0300 Subject: Apply case check diagnostic to impl items --- crates/ide/src/diagnostics.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index 70d5cbd38..8e508639b 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs @@ -903,6 +903,30 @@ fn some_fn() { fn foo() { const ANOTHER_ITEM<|>: &str = "some_item"; } +"#, + ); + } + + #[test] + fn test_rename_incorrect_case_struct_method() { + check_fixes( + r#" +pub struct TestStruct; + +impl TestStruct { + pub fn SomeFn<|>() -> TestStruct { + TestStruct + } +} +"#, + r#" +pub struct TestStruct; + +impl TestStruct { + pub fn some_fn() -> TestStruct { + TestStruct + } +} "#, ); } -- cgit v1.2.3