aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/diagnostics.rs')
-rw-r--r--crates/ide/src/diagnostics.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs
index 71ab98c1f..ad1b265fd 100644
--- a/crates/ide/src/diagnostics.rs
+++ b/crates/ide/src/diagnostics.rs
@@ -853,5 +853,31 @@ pub fn some_fn(val: TestStruct) -> TestStruct {
853} 853}
854"#, 854"#,
855 ); 855 );
856
857 check_fixes(
858 r#"
859pub fn some_fn(NonSnakeCase<|>: u8) -> u8 {
860 NonSnakeCase
861}
862"#,
863 r#"
864pub fn some_fn(non_snake_case: u8) -> u8 {
865 non_snake_case
866}
867"#,
868 );
869
870 check_fixes(
871 r#"
872pub fn SomeFn<|>(val: u8) -> u8 {
873 if val != 0 { SomeFn(val - 1) } else { val }
874}
875"#,
876 r#"
877pub fn some_fn(val: u8) -> u8 {
878 if val != 0 { some_fn(val - 1) } else { val }
879}
880"#,
881 );
856 } 882 }
857} 883}