Skip to content

Commit 05d4a5a

Browse files
Use mark/hit
1 parent d338513 commit 05d4a5a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/hir_ty/src/diagnostics/decl_check.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use syntax::{
2626
ast::{self, NameOwner},
2727
AstNode, AstPtr,
2828
};
29+
use test_utils::mark;
2930

3031
use crate::{
3132
db::HirDatabase,
@@ -88,6 +89,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
8889
fn validate_func(&mut self, db: &dyn HirDatabase, func: FunctionId) {
8990
let data = db.function_data(func);
9091
if data.is_extern {
92+
mark::hit!(extern_func_incorrect_case_ignored);
9193
return;
9294
}
9395

@@ -653,6 +655,7 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
653655
fn validate_static(&mut self, db: &dyn HirDatabase, static_id: StaticId) {
654656
let data = db.static_data(static_id);
655657
if data.is_extern {
658+
mark::hit!(extern_static_incorrect_case_ignored);
656659
return;
657660
}
658661

@@ -716,6 +719,8 @@ fn pat_equals_to_name(pat: Option<ast::Pat>, name: &Name) -> bool {
716719

717720
#[cfg(test)]
718721
mod tests {
722+
use test_utils::mark;
723+
719724
use crate::diagnostics::tests::check_diagnostics;
720725

721726
#[test]
@@ -930,6 +935,8 @@ fn main() {
930935

931936
#[test]
932937
fn ignores_extern_items() {
938+
mark::check!(extern_func_incorrect_case_ignored);
939+
mark::check!(extern_static_incorrect_case_ignored);
933940
check_diagnostics(
934941
r#"
935942
extern {

0 commit comments

Comments
 (0)