aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorivan770 <[email protected]>2021-05-17 10:37:24 +0100
committerivan770 <[email protected]>2021-05-17 10:37:24 +0100
commit999217374f7be95eddee8c109790c6cfa0ce67e5 (patch)
tree6c99516a7ae1b79e803e200dd5f6dd75f154d408 /crates
parenta79b54ef7323d38b8c02094de32fb45a7c8fff8a (diff)
Added cov mark
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_def/src/nameres/collector.rs1
-rw-r--r--crates/hir_def/src/nameres/tests.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index cebc2dc40..19db6cc59 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -482,6 +482,7 @@ impl DefCollector<'_> {
482 482
483 if let Some(ModuleDefId::ModuleId(m)) = res.take_types() { 483 if let Some(ModuleDefId::ModuleId(m)) = res.take_types() {
484 if m == self.def_map.module_id(current_module_id) { 484 if m == self.def_map.module_id(current_module_id) {
485 cov_mark::hit!(ignore_macro_use_extern_crate_self);
485 return; 486 return;
486 } 487 }
487 488
diff --git a/crates/hir_def/src/nameres/tests.rs b/crates/hir_def/src/nameres/tests.rs
index 91c37a55d..9f652731d 100644
--- a/crates/hir_def/src/nameres/tests.rs
+++ b/crates/hir_def/src/nameres/tests.rs
@@ -411,7 +411,8 @@ struct Arc;
411} 411}
412 412
413#[test] 413#[test]
414fn extern_crate_self() { 414fn macro_use_extern_crate_self() {
415 cov_mark::check!(ignore_macro_use_extern_crate_self);
415 check( 416 check(
416 r#" 417 r#"
417//- /main.rs crate:main 418//- /main.rs crate:main