From 546be18e3a91e4844b0dacc76c9f055397b6d89e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 12:33:08 +0300 Subject: internal: check that coverage marks are always paired --- crates/hir_def/src/body/tests/block.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs index bc3d0f138..15c10d053 100644 --- a/crates/hir_def/src/body/tests/block.rs +++ b/crates/hir_def/src/body/tests/block.rs @@ -163,14 +163,14 @@ fn legacy_macro_items() { // correctly. check_at( r#" -macro_rules! hit { +macro_rules! mark { () => { struct Hit {} } } fn f() { - hit!(); + mark!(); $0 } "#, @@ -193,20 +193,20 @@ use core::cov_mark; fn f() { fn nested() { - cov_mark::hit!(Hit); + cov_mark::mark!(Hit); $0 } } //- /core.rs crate:core pub mod cov_mark { #[macro_export] - macro_rules! _hit { + macro_rules! _mark { ($name:ident) => { struct $name {} } } - pub use crate::_hit as hit; + pub use crate::_mark as mark; } "#, expect![[r#" -- cgit v1.2.3