diff options
Diffstat (limited to 'crates/mbe')
-rw-r--r-- | crates/mbe/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/mbe/src/lib.rs | 5 | ||||
-rw-r--r-- | crates/mbe/src/tests.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/mbe/Cargo.toml b/crates/mbe/Cargo.toml index bb2656a80..c7d5e39fa 100644 --- a/crates/mbe/Cargo.toml +++ b/crates/mbe/Cargo.toml | |||
@@ -10,6 +10,7 @@ edition = "2018" | |||
10 | doctest = false | 10 | doctest = false |
11 | 11 | ||
12 | [dependencies] | 12 | [dependencies] |
13 | cov-mark = "1.1" | ||
13 | rustc-hash = "1.1.0" | 14 | rustc-hash = "1.1.0" |
14 | smallvec = "1.2.0" | 15 | smallvec = "1.2.0" |
15 | log = "0.4.8" | 16 | log = "0.4.8" |
diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index f3d2da55a..33b85e23d 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs | |||
@@ -17,7 +17,6 @@ mod benchmark; | |||
17 | 17 | ||
18 | use std::fmt; | 18 | use std::fmt; |
19 | 19 | ||
20 | use test_utils::mark; | ||
21 | pub use tt::{Delimiter, DelimiterKind, Punct}; | 20 | pub use tt::{Delimiter, DelimiterKind, Punct}; |
22 | 21 | ||
23 | use crate::{ | 22 | use crate::{ |
@@ -217,7 +216,7 @@ impl MacroDef { | |||
217 | let mut rules = Vec::new(); | 216 | let mut rules = Vec::new(); |
218 | 217 | ||
219 | if Some(tt::DelimiterKind::Brace) == tt.delimiter_kind() { | 218 | if Some(tt::DelimiterKind::Brace) == tt.delimiter_kind() { |
220 | mark::hit!(parse_macro_def_rules); | 219 | cov_mark::hit!(parse_macro_def_rules); |
221 | while src.len() > 0 { | 220 | while src.len() > 0 { |
222 | let rule = Rule::parse(&mut src, true)?; | 221 | let rule = Rule::parse(&mut src, true)?; |
223 | rules.push(rule); | 222 | rules.push(rule); |
@@ -229,7 +228,7 @@ impl MacroDef { | |||
229 | } | 228 | } |
230 | } | 229 | } |
231 | } else { | 230 | } else { |
232 | mark::hit!(parse_macro_def_simple); | 231 | cov_mark::hit!(parse_macro_def_simple); |
233 | let rule = Rule::parse(&mut src, false)?; | 232 | let rule = Rule::parse(&mut src, false)?; |
234 | if src.len() != 0 { | 233 | if src.len() != 0 { |
235 | return Err(ParseError::Expected("remain tokens in macro def".to_string())); | 234 | return Err(ParseError::Expected("remain tokens in macro def".to_string())); |
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 08acd4ac2..3a168bb4b 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs | |||
@@ -6,7 +6,7 @@ use syntax::{ | |||
6 | SyntaxKind::{ERROR, IDENT}, | 6 | SyntaxKind::{ERROR, IDENT}, |
7 | SyntaxNode, WalkEvent, T, | 7 | SyntaxNode, WalkEvent, T, |
8 | }; | 8 | }; |
9 | use test_utils::{assert_eq_text, mark}; | 9 | use test_utils::assert_eq_text; |
10 | 10 | ||
11 | use super::*; | 11 | use super::*; |
12 | 12 | ||
@@ -687,7 +687,7 @@ fn test_match_literal() { | |||
687 | 687 | ||
688 | #[test] | 688 | #[test] |
689 | fn test_parse_macro_def_simple() { | 689 | fn test_parse_macro_def_simple() { |
690 | mark::check!(parse_macro_def_simple); | 690 | cov_mark::check!(parse_macro_def_simple); |
691 | 691 | ||
692 | parse_macro2( | 692 | parse_macro2( |
693 | r#" | 693 | r#" |
@@ -701,7 +701,7 @@ macro foo($id:ident) { | |||
701 | 701 | ||
702 | #[test] | 702 | #[test] |
703 | fn test_parse_macro_def_rules() { | 703 | fn test_parse_macro_def_rules() { |
704 | mark::check!(parse_macro_def_rules); | 704 | cov_mark::check!(parse_macro_def_rules); |
705 | 705 | ||
706 | parse_macro2( | 706 | parse_macro2( |
707 | r#" | 707 | r#" |