diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs index 724bad867dd..25587e11686 100644 --- a/crates/hir_ty/src/diagnostics/decl_check.rs +++ b/crates/hir_ty/src/diagnostics/decl_check.rs @@ -26,6 +26,7 @@ ast::{self, NameOwner}, AstNode, AstPtr, }; +use test_utils::mark; use crate::{ db::HirDatabase, @@ -88,6 +89,7 @@ fn allowed(&self, db: &dyn HirDatabase, id: AttrDefId, allow_name: &str) -> bool fn validate_func(&mut self, db: &dyn HirDatabase, func: FunctionId) { let data = db.function_data(func); if data.is_extern { + mark::hit!(extern_func_incorrect_case_ignored); return; } @@ -653,6 +655,7 @@ fn validate_const(&mut self, db: &dyn HirDatabase, const_id: ConstId) { fn validate_static(&mut self, db: &dyn HirDatabase, static_id: StaticId) { let data = db.static_data(static_id); if data.is_extern { + mark::hit!(extern_static_incorrect_case_ignored); return; } @@ -716,6 +719,8 @@ fn pat_equals_to_name(pat: Option, name: &Name) -> bool { #[cfg(test)] mod tests { + use test_utils::mark; + use crate::diagnostics::tests::check_diagnostics; #[test] @@ -930,6 +935,8 @@ pub struct some_type { #[test] fn ignores_extern_items() { + mark::check!(extern_func_incorrect_case_ignored); + mark::check!(extern_static_incorrect_case_ignored); check_diagnostics( r#" extern {