File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -781,7 +781,8 @@ impl Function {
781
781
}
782
782
783
783
pub fn diagnostics ( self , db : & dyn HirDatabase , sink : & mut DiagnosticSink ) {
784
- hir_ty:: diagnostics:: validate_body ( db, self . id . into ( ) , sink)
784
+ hir_ty:: diagnostics:: validate_module_item ( db, self . id . into ( ) , sink) ;
785
+ hir_ty:: diagnostics:: validate_body ( db, self . id . into ( ) , sink) ;
785
786
}
786
787
787
788
/// Whether this function declaration has a definition.
Original file line number Diff line number Diff line change @@ -903,6 +903,30 @@ fn some_fn() {
903
903
fn foo() {
904
904
const ANOTHER_ITEM<|>: &str = "some_item";
905
905
}
906
+ "# ,
907
+ ) ;
908
+ }
909
+
910
+ #[ test]
911
+ fn test_rename_incorrect_case_struct_method ( ) {
912
+ check_fixes (
913
+ r#"
914
+ pub struct TestStruct;
915
+
916
+ impl TestStruct {
917
+ pub fn SomeFn<|>() -> TestStruct {
918
+ TestStruct
919
+ }
920
+ }
921
+ "# ,
922
+ r#"
923
+ pub struct TestStruct;
924
+
925
+ impl TestStruct {
926
+ pub fn some_fn() -> TestStruct {
927
+ TestStruct
928
+ }
929
+ }
906
930
"# ,
907
931
) ;
908
932
}
You can’t perform that action at this time.
0 commit comments