aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r--crates/hir_ty/src/diagnostics/decl_check.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs
index 724bad867..25587e116 100644
--- a/crates/hir_ty/src/diagnostics/decl_check.rs
+++ b/crates/hir_ty/src/diagnostics/decl_check.rs
@@ -26,6 +26,7 @@ use syntax::{
26 ast::{self, NameOwner}, 26 ast::{self, NameOwner},
27 AstNode, AstPtr, 27 AstNode, AstPtr,
28}; 28};
29use test_utils::mark;
29 30
30use crate::{ 31use crate::{
31 db::HirDatabase, 32 db::HirDatabase,
@@ -88,6 +89,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
88 fn validate_func(&mut self, db: &dyn HirDatabase, func: FunctionId) { 89 fn validate_func(&mut self, db: &dyn HirDatabase, func: FunctionId) {
89 let data = db.function_data(func); 90 let data = db.function_data(func);
90 if data.is_extern { 91 if data.is_extern {
92 mark::hit!(extern_func_incorrect_case_ignored);
91 return; 93 return;
92 } 94 }
93 95
@@ -653,6 +655,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
653 fn validate_static(&mut self, db: &dyn HirDatabase, static_id: StaticId) { 655 fn validate_static(&mut self, db: &dyn HirDatabase, static_id: StaticId) {
654 let data = db.static_data(static_id); 656 let data = db.static_data(static_id);
655 if data.is_extern { 657 if data.is_extern {
658 mark::hit!(extern_static_incorrect_case_ignored);
656 return; 659 return;
657 } 660 }
658 661
@@ -716,6 +719,8 @@ fn pat_equals_to_name(pat: Option<ast::Pat>, name: &Name) -> bool {
716 719
717#[cfg(test)] 720#[cfg(test)]
718mod tests { 721mod tests {
722 use test_utils::mark;
723
719 use crate::diagnostics::tests::check_diagnostics; 724 use crate::diagnostics::tests::check_diagnostics;
720 725
721 #[test] 726 #[test]
@@ -930,6 +935,8 @@ fn main() {
930 935
931 #[test] 936 #[test]
932 fn ignores_extern_items() { 937 fn ignores_extern_items() {
938 mark::check!(extern_func_incorrect_case_ignored);
939 mark::check!(extern_static_incorrect_case_ignored);
933 check_diagnostics( 940 check_diagnostics(
934 r#" 941 r#"
935extern { 942extern {