aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2021-03-08 20:19:44 +0000
committerLaurenČ›iu Nicola <[email protected]>2021-03-08 20:19:44 +0000
commitfc9eed4836dfc88fe2893c81b015ab440cea2ba6 (patch)
tree3905029a42c8bb6c5d363753b34cd6b5dd43f4d5 /crates/mbe
parentc5189a22ccf4c28e309e4189defbb88b83bb2aea (diff)
Use upstream cov-mark
Diffstat (limited to 'crates/mbe')
-rw-r--r--crates/mbe/Cargo.toml1
-rw-r--r--crates/mbe/src/lib.rs5
-rw-r--r--crates/mbe/src/tests.rs6
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"
10doctest = false 10doctest = false
11 11
12[dependencies] 12[dependencies]
13cov-mark = "1.1"
13rustc-hash = "1.1.0" 14rustc-hash = "1.1.0"
14smallvec = "1.2.0" 15smallvec = "1.2.0"
15log = "0.4.8" 16log = "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
18use std::fmt; 18use std::fmt;
19 19
20use test_utils::mark;
21pub use tt::{Delimiter, DelimiterKind, Punct}; 20pub use tt::{Delimiter, DelimiterKind, Punct};
22 21
23use crate::{ 22use 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};
9use test_utils::{assert_eq_text, mark}; 9use test_utils::assert_eq_text;
10 10
11use super::*; 11use super::*;
12 12
@@ -687,7 +687,7 @@ fn test_match_literal() {
687 687
688#[test] 688#[test]
689fn test_parse_macro_def_simple() { 689fn 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]
703fn test_parse_macro_def_rules() { 703fn 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#"