Apply case check diagnostic to impl items
This commit is contained in:
parent
2a72f876d6
commit
50a147dcdf
@ -781,7 +781,8 @@ pub fn is_unsafe(self, db: &dyn HirDatabase) -> bool {
|
||||
}
|
||||
|
||||
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
|
||||
hir_ty::diagnostics::validate_body(db, self.id.into(), sink)
|
||||
hir_ty::diagnostics::validate_module_item(db, self.id.into(), sink);
|
||||
hir_ty::diagnostics::validate_body(db, self.id.into(), sink);
|
||||
}
|
||||
|
||||
/// Whether this function declaration has a definition.
|
||||
|
@ -903,6 +903,30 @@ fn test_uppercase_const_no_diagnostics() {
|
||||
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
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user