From fc9eed4836dfc88fe2893c81b015ab440cea2ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 8 Mar 2021 22:19:44 +0200 Subject: Use upstream cov-mark --- crates/hir_def/Cargo.toml | 1 + crates/hir_def/src/attr.rs | 3 +-- crates/hir_def/src/body.rs | 3 +-- crates/hir_def/src/body/lower.rs | 3 +-- crates/hir_def/src/body/scope.rs | 4 ++-- crates/hir_def/src/body/tests.rs | 3 +-- crates/hir_def/src/body/tests/block.rs | 10 +++++----- crates/hir_def/src/find_path.rs | 22 ++++++++++------------ crates/hir_def/src/import_map.rs | 6 ++---- crates/hir_def/src/item_scope.rs | 3 +-- crates/hir_def/src/item_tree.rs | 1 - crates/hir_def/src/item_tree/lower.rs | 2 +- crates/hir_def/src/nameres/collector.rs | 17 ++++++++--------- crates/hir_def/src/nameres/mod_resolution.rs | 3 +-- crates/hir_def/src/nameres/path_resolution.rs | 11 +++++------ crates/hir_def/src/nameres/tests.rs | 9 ++++----- crates/hir_def/src/nameres/tests/diagnostics.rs | 5 ++--- crates/hir_def/src/nameres/tests/globs.rs | 8 ++++---- crates/hir_def/src/nameres/tests/macros.rs | 10 +++++----- crates/hir_def/src/nameres/tests/mod_resolution.rs | 4 ++-- crates/hir_def/src/path/lower/lower_use.rs | 3 +-- 21 files changed, 58 insertions(+), 73 deletions(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/Cargo.toml b/crates/hir_def/Cargo.toml index 535221294..2f07b6d01 100644 --- a/crates/hir_def/Cargo.toml +++ b/crates/hir_def/Cargo.toml @@ -10,6 +10,7 @@ edition = "2018" doctest = false [dependencies] +cov-mark = "1.1" log = "0.4.8" once_cell = "1.3.1" rustc-hash = "1.1.0" diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index 24ffa6c3a..b716d5f6e 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -13,7 +13,6 @@ use syntax::{ ast::{self, AstNode, AttrsOwner}, match_ast, AstToken, SmolStr, SyntaxNode, }; -use test_utils::mark; use tt::Subtree; use crate::{ @@ -177,7 +176,7 @@ impl RawAttrs { if cfg_options.check(&cfg) == Some(false) { None } else { - mark::hit!(cfg_attr_active); + cov_mark::hit!(cfg_attr_active); let attr = ast::Attr::parse(&format!("#[{}]", attr)).ok()?; let hygiene = Hygiene::new_unhygienic(); // FIXME diff --git a/crates/hir_def/src/body.rs b/crates/hir_def/src/body.rs index 16e1bac40..b1a3fe1cb 100644 --- a/crates/hir_def/src/body.rs +++ b/crates/hir_def/src/body.rs @@ -20,7 +20,6 @@ use la_arena::{Arena, ArenaMap}; use profile::Count; use rustc_hash::FxHashMap; use syntax::{ast, AstNode, AstPtr}; -use test_utils::mark; pub(crate) use lower::LowerCtx; @@ -105,7 +104,7 @@ impl Expander { macro_call: ast::MacroCall, ) -> ExpandResult> { if self.recursion_limit + 1 > EXPANSION_RECURSION_LIMIT { - mark::hit!(your_stack_belongs_to_me); + cov_mark::hit!(your_stack_belongs_to_me); return ExpandResult::str_err("reached recursion limit during macro expansion".into()); } diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 40beb2f7a..d4abe819d 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs @@ -19,7 +19,6 @@ use syntax::{ }, AstNode, AstPtr, SyntaxNodePtr, }; -use test_utils::mark; use crate::{ adt::StructKind, @@ -286,7 +285,7 @@ impl ExprCollector<'_> { None => self.collect_expr_opt(condition.expr()), // if let -- desugar to match Some(pat) => { - mark::hit!(infer_resolve_while_let); + cov_mark::hit!(infer_resolve_while_let); let pat = self.collect_pat(pat); let match_expr = self.collect_expr_opt(condition.expr()); let placeholder_pat = self.missing_pat(); diff --git a/crates/hir_def/src/body/scope.rs b/crates/hir_def/src/body/scope.rs index 210b4a617..1bbb54fc6 100644 --- a/crates/hir_def/src/body/scope.rs +++ b/crates/hir_def/src/body/scope.rs @@ -186,7 +186,7 @@ mod tests { use base_db::{fixture::WithFixture, FileId, SourceDatabase}; use hir_expand::{name::AsName, InFile}; use syntax::{algo::find_node_at_offset, ast, AstNode}; - use test_utils::{assert_eq_text, extract_offset, mark}; + use test_utils::{assert_eq_text, extract_offset}; use crate::{db::DefDatabase, test_db::TestDB, FunctionId, ModuleDefId}; @@ -454,7 +454,7 @@ fn foo() { #[test] fn while_let_desugaring() { - mark::check!(infer_resolve_while_let); + cov_mark::check!(infer_resolve_while_let); do_check_local_name( r#" fn test() { diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs index bb43569d7..991a32b15 100644 --- a/crates/hir_def/src/body/tests.rs +++ b/crates/hir_def/src/body/tests.rs @@ -2,7 +2,6 @@ mod block; use base_db::{fixture::WithFixture, SourceDatabase}; use expect_test::Expect; -use test_utils::mark; use crate::{test_db::TestDB, ModuleDefId}; @@ -48,7 +47,7 @@ fn check_at(ra_fixture: &str, expect: Expect) { #[test] fn your_stack_belongs_to_me() { - mark::check!(your_stack_belongs_to_me); + cov_mark::check!(your_stack_belongs_to_me); lower( " macro_rules! n_nuple { diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs index 8bca72a17..3b6ba4cde 100644 --- a/crates/hir_def/src/body/tests/block.rs +++ b/crates/hir_def/src/body/tests/block.rs @@ -165,16 +165,16 @@ fn macro_resolve() { check_at( r#" //- /lib.rs crate:lib deps:core -use core::mark; +use core::cov_mark; fn f() { fn nested() { - mark::hit!(Hit); + cov_mark::hit!(Hit); $0 } } //- /core.rs crate:core -pub mod mark { +pub mod cov_mark { #[macro_export] macro_rules! _hit { ($name:ident) => { @@ -193,8 +193,8 @@ pub mod mark { nested: v crate + cov_mark: t f: v - mark: t "#]], ); } @@ -264,7 +264,7 @@ fn main() { fn underscore_import() { // This used to panic, because the default (private) visibility inside block expressions would // point into the containing `DefMap`, which visibilities should never be able to do. - mark::check!(adjust_vis_in_block_def_map); + cov_mark::check!(adjust_vis_in_block_def_map); check_at( r#" mod m { diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs index 3a98ffbaa..de08e2737 100644 --- a/crates/hir_def/src/find_path.rs +++ b/crates/hir_def/src/find_path.rs @@ -4,7 +4,6 @@ use std::iter; use hir_expand::name::{known, AsName, Name}; use rustc_hash::FxHashSet; -use test_utils::mark; use crate::nameres::DefMap; use crate::{ @@ -215,7 +214,7 @@ fn find_path_inner( best_path_len - 1, prefixed, )?; - mark::hit!(partially_imported); + cov_mark::hit!(partially_imported); path.push_segment(info.path.segments.last().unwrap().clone()); Some(path) }) @@ -235,7 +234,7 @@ fn find_path_inner( // that correctly (FIXME). if let Some(item_module) = item.as_module_def_id().and_then(|did| did.module(db)) { if item_module.def_map(db).block_id().is_some() && prefixed.is_some() { - mark::hit!(prefixed_in_block_expression); + cov_mark::hit!(prefixed_in_block_expression); prefixed = Some(PrefixKind::Plain); } } @@ -252,18 +251,18 @@ fn find_path_inner( fn select_best_path(old_path: ModPath, new_path: ModPath, prefer_no_std: bool) -> ModPath { if old_path.starts_with_std() && new_path.can_start_with_std() { if prefer_no_std { - mark::hit!(prefer_no_std_paths); + cov_mark::hit!(prefer_no_std_paths); new_path } else { - mark::hit!(prefer_std_paths); + cov_mark::hit!(prefer_std_paths); old_path } } else if new_path.starts_with_std() && old_path.can_start_with_std() { if prefer_no_std { - mark::hit!(prefer_no_std_paths); + cov_mark::hit!(prefer_no_std_paths); old_path } else { - mark::hit!(prefer_std_paths); + cov_mark::hit!(prefer_std_paths); new_path } } else if new_path.len() < old_path.len() { @@ -364,7 +363,6 @@ mod tests { use base_db::fixture::WithFixture; use hir_expand::hygiene::Hygiene; use syntax::ast::AstNode; - use test_utils::mark; use crate::test_db::TestDB; @@ -522,7 +520,7 @@ mod tests { #[test] fn partially_imported() { - mark::check!(partially_imported); + cov_mark::check!(partially_imported); // Tests that short paths are used even for external items, when parts of the path are // already in scope. let code = r#" @@ -686,7 +684,7 @@ mod tests { #[test] fn prefer_std_paths_over_alloc() { - mark::check!(prefer_std_paths); + cov_mark::check!(prefer_std_paths); let code = r#" //- /main.rs crate:main deps:alloc,std $0 @@ -712,7 +710,7 @@ mod tests { #[test] fn prefer_core_paths_over_std() { - mark::check!(prefer_no_std_paths); + cov_mark::check!(prefer_no_std_paths); let code = r#" //- /main.rs crate:main deps:core,std #![no_std] @@ -842,7 +840,7 @@ mod tests { #[test] fn inner_items_from_inner_module() { - mark::check!(prefixed_in_block_expression); + cov_mark::check!(prefixed_in_block_expression); check_found_path( r#" fn main() { diff --git a/crates/hir_def/src/import_map.rs b/crates/hir_def/src/import_map.rs index e1c28bc83..369bc3350 100644 --- a/crates/hir_def/src/import_map.rs +++ b/crates/hir_def/src/import_map.rs @@ -8,7 +8,6 @@ use hir_expand::name::Name; use indexmap::{map::Entry, IndexMap}; use itertools::Itertools; use rustc_hash::{FxHashSet, FxHasher}; -use test_utils::mark; use crate::{ db::DefDatabase, item_scope::ItemInNs, visibility::Visibility, AssocItemId, ModuleDefId, @@ -193,7 +192,7 @@ impl ImportMap { // cannot use associated type aliases directly: need a `::TypeAlias` // qualifier, ergo no need to store it for imports in import_map AssocItemId::TypeAliasId(_) => { - mark::hit!(type_aliases_ignored); + cov_mark::hit!(type_aliases_ignored); continue; } }; @@ -463,7 +462,6 @@ fn item_import_kind(item: ItemInNs) -> Option { mod tests { use base_db::{fixture::WithFixture, SourceDatabase, Upcast}; use expect_test::{expect, Expect}; - use test_utils::mark; use crate::{test_db::TestDB, AssocContainerId, Lookup}; @@ -801,7 +799,7 @@ mod tests { #[test] fn fuzzy_import_trait_and_assoc_items() { - mark::check!(type_aliases_ignored); + cov_mark::check!(type_aliases_ignored); let ra_fixture = r#" //- /main.rs crate:main deps:dep //- /dep.rs crate:dep diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs index 4e5daa2ff..919933813 100644 --- a/crates/hir_def/src/item_scope.rs +++ b/crates/hir_def/src/item_scope.rs @@ -9,7 +9,6 @@ use hir_expand::MacroDefKind; use once_cell::sync::Lazy; use rustc_hash::{FxHashMap, FxHashSet}; use stdx::format_to; -use test_utils::mark; use crate::{ db::DefDatabase, per_ns::PerNs, visibility::Visibility, AdtId, BuiltinType, ImplId, @@ -237,7 +236,7 @@ impl ItemScope { if $glob_imports.$field.contains(&$lookup) && matches!($def_import_type, ImportType::Named) => { - mark::hit!(import_shadowed); + cov_mark::hit!(import_shadowed); $glob_imports.$field.remove(&$lookup); if let Some(fld) = $def.$field { entry.insert(fld); diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index 3233b1957..6bb334573 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs @@ -25,7 +25,6 @@ use profile::Count; use rustc_hash::FxHashMap; use smallvec::SmallVec; use syntax::{ast, match_ast, SyntaxKind}; -use test_utils::mark; use crate::{ attr::{Attrs, RawAttrs}, diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index 8f2f0b340..240fdacf9 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs @@ -466,7 +466,7 @@ impl Ctx { .collect() }) .unwrap_or_else(|| { - mark::hit!(name_res_works_for_broken_modules); + cov_mark::hit!(name_res_works_for_broken_modules); Box::new([]) as Box<[_]> }), } diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index e51d89b43..3bb69d935 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -18,7 +18,6 @@ use hir_expand::{ use hir_expand::{InFile, MacroCallLoc}; use rustc_hash::{FxHashMap, FxHashSet}; use syntax::ast; -use test_utils::mark; use tt::{Leaf, TokenTree}; use crate::{ @@ -462,7 +461,7 @@ impl DefCollector<'_> { let res = self.def_map.resolve_name_in_extern_prelude(&extern_crate.name); if let Some(ModuleDefId::ModuleId(m)) = res.take_types() { - mark::hit!(macro_rules_from_other_crates_are_visible_with_macro_use); + cov_mark::hit!(macro_rules_from_other_crates_are_visible_with_macro_use); self.import_all_macros_exported(current_module_id, m.krate); } } @@ -571,10 +570,10 @@ impl DefCollector<'_> { match def.take_types() { Some(ModuleDefId::ModuleId(m)) => { if import.is_prelude { - mark::hit!(std_prelude); + cov_mark::hit!(std_prelude); self.def_map.prelude = Some(m); } else if m.krate != self.def_map.krate { - mark::hit!(glob_across_crates); + cov_mark::hit!(glob_across_crates); // glob import from other crate => we can just import everything once let item_map = m.def_map(self.db); let scope = &item_map[m.local_id].scope; @@ -626,7 +625,7 @@ impl DefCollector<'_> { } } Some(ModuleDefId::AdtId(AdtId::EnumId(e))) => { - mark::hit!(glob_enum); + cov_mark::hit!(glob_enum); // glob import from enum => just import all the variants // XXX: urgh, so this works by accident! Here, we look at @@ -675,7 +674,7 @@ impl DefCollector<'_> { self.update(module_id, &[(name, def)], vis, ImportType::Named); } - None => mark::hit!(bogus_paths), + None => cov_mark::hit!(bogus_paths), } } } @@ -738,7 +737,7 @@ impl DefCollector<'_> { if max_vis == old_vis { false } else { - mark::hit!(upgrade_underscore_visibility); + cov_mark::hit!(upgrade_underscore_visibility); true } } @@ -866,7 +865,7 @@ impl DefCollector<'_> { depth: usize, ) { if depth > EXPANSION_DEPTH_LIMIT { - mark::hit!(macro_expansion_overflow); + cov_mark::hit!(macro_expansion_overflow); log::warn!("macro expansion is too deep"); return; } @@ -1009,7 +1008,7 @@ impl ModCollector<'_, '_> { // Prelude module is always considered to be `#[macro_use]`. if let Some(prelude_module) = self.def_collector.def_map.prelude { if prelude_module.krate != self.def_collector.def_map.krate { - mark::hit!(prelude_is_macro_use); + cov_mark::hit!(prelude_is_macro_use); self.def_collector.import_all_macros_exported(self.module_id, prelude_module.krate); } } diff --git a/crates/hir_def/src/nameres/mod_resolution.rs b/crates/hir_def/src/nameres/mod_resolution.rs index af3262439..d5de9899c 100644 --- a/crates/hir_def/src/nameres/mod_resolution.rs +++ b/crates/hir_def/src/nameres/mod_resolution.rs @@ -2,7 +2,6 @@ use base_db::{AnchoredPath, FileId}; use hir_expand::name::Name; use syntax::SmolStr; -use test_utils::mark; use crate::{db::DefDatabase, HirFileId}; @@ -28,7 +27,7 @@ impl ModDir { let depth = self.depth + 1; if depth > MOD_DEPTH_LIMIT { log::error!("MOD_DEPTH_LIMIT exceeded"); - mark::hit!(circular_mods); + cov_mark::hit!(circular_mods); return None; } Some(ModDir { dir_path, root_non_dir_owner, depth }) diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs index dd1db0094..8258dcffb 100644 --- a/crates/hir_def/src/nameres/path_resolution.rs +++ b/crates/hir_def/src/nameres/path_resolution.rs @@ -13,7 +13,6 @@ use base_db::Edition; use hir_expand::name; use hir_expand::name::Name; -use test_utils::mark; use crate::{ db::DefDatabase, @@ -63,7 +62,7 @@ impl ResolvePathResult { impl DefMap { pub(super) fn resolve_name_in_extern_prelude(&self, name: &Name) -> PerNs { if name == &name!(self) { - mark::hit!(extern_crate_self_as); + cov_mark::hit!(extern_crate_self_as); return PerNs::types(self.module_id(self.root).into(), Visibility::Public); } self.extern_prelude @@ -101,7 +100,7 @@ impl DefMap { // DefMap they're written in, so we restrict them when that happens. if let Visibility::Module(m) = vis { if self.block_id() != m.block { - mark::hit!(adjust_vis_in_block_def_map); + cov_mark::hit!(adjust_vis_in_block_def_map); vis = Visibility::Module(self.module_id(self.root())); log::debug!("visibility {:?} points outside DefMap, adjusting to {:?}", m, vis); } @@ -169,12 +168,12 @@ impl DefMap { let mut curr_per_ns: PerNs = match path.kind { PathKind::DollarCrate(krate) => { if krate == self.krate { - mark::hit!(macro_dollar_crate_self); + cov_mark::hit!(macro_dollar_crate_self); PerNs::types(self.crate_root(db).into(), Visibility::Public) } else { let def_map = db.crate_def_map(krate); let module = def_map.module_id(def_map.root); - mark::hit!(macro_dollar_crate_other); + cov_mark::hit!(macro_dollar_crate_other); PerNs::types(module.into(), Visibility::Public) } } @@ -310,7 +309,7 @@ impl DefMap { } ModuleDefId::AdtId(AdtId::EnumId(e)) => { // enum variant - mark::hit!(can_import_enum_variant); + cov_mark::hit!(can_import_enum_variant); let enum_data = db.enum_data(e); match enum_data.variant(&segment) { Some(local_id) => { diff --git a/crates/hir_def/src/nameres/tests.rs b/crates/hir_def/src/nameres/tests.rs index bd3e2701b..de3aa4f9a 100644 --- a/crates/hir_def/src/nameres/tests.rs +++ b/crates/hir_def/src/nameres/tests.rs @@ -9,7 +9,6 @@ use std::sync::Arc; use base_db::{fixture::WithFixture, SourceDatabase}; use expect_test::{expect, Expect}; -use test_utils::mark; use crate::{db::DefDatabase, test_db::TestDB}; @@ -136,7 +135,7 @@ mod m { #[test] fn bogus_paths() { - mark::check!(bogus_paths); + cov_mark::check!(bogus_paths); check( r#" //- /lib.rs @@ -243,7 +242,7 @@ pub struct Baz; #[test] fn std_prelude() { - mark::check!(std_prelude); + cov_mark::check!(std_prelude); check( r#" //- /main.rs crate:main deps:test_crate @@ -267,7 +266,7 @@ pub enum Foo { Bar, Baz }; #[test] fn can_import_enum_variant() { - mark::check!(can_import_enum_variant); + cov_mark::check!(can_import_enum_variant); check( r#" enum E { V } @@ -628,7 +627,7 @@ use crate::reex::*; #[test] fn underscore_pub_crate_reexport() { - mark::check!(upgrade_underscore_visibility); + cov_mark::check!(upgrade_underscore_visibility); check( r#" //- /main.rs crate:main deps:lib diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index e8e72e5ef..d5ef8ceb5 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs @@ -1,5 +1,4 @@ use base_db::fixture::WithFixture; -use test_utils::mark; use crate::test_db::TestDB; @@ -63,7 +62,7 @@ fn unresolved_extern_crate() { #[test] fn extern_crate_self_as() { - mark::check!(extern_crate_self_as); + cov_mark::check!(extern_crate_self_as); check_diagnostics( r" //- /lib.rs @@ -140,7 +139,7 @@ fn inactive_item() { /// Tests that `cfg` attributes behind `cfg_attr` is handled properly. #[test] fn inactive_via_cfg_attr() { - mark::check!(cfg_attr_active); + cov_mark::check!(cfg_attr_active); check_diagnostics( r#" //- /lib.rs diff --git a/crates/hir_def/src/nameres/tests/globs.rs b/crates/hir_def/src/nameres/tests/globs.rs index 2ae836e3c..17426d54d 100644 --- a/crates/hir_def/src/nameres/tests/globs.rs +++ b/crates/hir_def/src/nameres/tests/globs.rs @@ -148,7 +148,7 @@ pub(crate) struct PubCrateStruct; #[test] fn glob_across_crates() { - mark::check!(glob_across_crates); + cov_mark::check!(glob_across_crates); check( r#" //- /main.rs crate:main deps:test_crate @@ -184,7 +184,7 @@ struct Foo; #[test] fn glob_enum() { - mark::check!(glob_enum); + cov_mark::check!(glob_enum); check( r#" enum Foo { Bar, Baz } @@ -201,7 +201,7 @@ use self::Foo::*; #[test] fn glob_enum_group() { - mark::check!(glob_enum_group); + cov_mark::check!(glob_enum_group); check( r#" enum Foo { Bar, Baz } @@ -218,7 +218,7 @@ use self::Foo::{*}; #[test] fn glob_shadowed_def() { - mark::check!(import_shadowed); + cov_mark::check!(import_shadowed); check( r#" //- /lib.rs diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs index 36ed5e8ce..f65a655bf 100644 --- a/crates/hir_def/src/nameres/tests/macros.rs +++ b/crates/hir_def/src/nameres/tests/macros.rs @@ -210,7 +210,7 @@ macro_rules! bar { #[test] fn macro_rules_from_other_crates_are_visible_with_macro_use() { - mark::check!(macro_rules_from_other_crates_are_visible_with_macro_use); + cov_mark::check!(macro_rules_from_other_crates_are_visible_with_macro_use); check( r#" //- /main.rs crate:main deps:foo @@ -260,7 +260,7 @@ mod priv_mod { #[test] fn prelude_is_macro_use() { - mark::check!(prelude_is_macro_use); + cov_mark::check!(prelude_is_macro_use); check( r#" //- /main.rs crate:main deps:foo @@ -550,7 +550,7 @@ mod m { #[test] fn macro_dollar_crate_is_correct_in_item() { - mark::check!(macro_dollar_crate_self); + cov_mark::check!(macro_dollar_crate_self); check( r#" //- /main.rs crate:main deps:foo @@ -608,7 +608,7 @@ struct Baz; #[test] fn macro_dollar_crate_is_correct_in_indirect_deps() { - mark::check!(macro_dollar_crate_other); + cov_mark::check!(macro_dollar_crate_other); // From std check( r#" @@ -686,7 +686,7 @@ pub trait Clone {} #[test] fn macro_expansion_overflow() { - mark::check!(macro_expansion_overflow); + cov_mark::check!(macro_expansion_overflow); check( r#" macro_rules! a { diff --git a/crates/hir_def/src/nameres/tests/mod_resolution.rs b/crates/hir_def/src/nameres/tests/mod_resolution.rs index e80b593aa..dfbbad1f9 100644 --- a/crates/hir_def/src/nameres/tests/mod_resolution.rs +++ b/crates/hir_def/src/nameres/tests/mod_resolution.rs @@ -2,7 +2,7 @@ use super::*; #[test] fn name_res_works_for_broken_modules() { - mark::check!(name_res_works_for_broken_modules); + cov_mark::check!(name_res_works_for_broken_modules); check( r" //- /lib.rs @@ -774,7 +774,7 @@ struct X; #[test] fn circular_mods() { - mark::check!(circular_mods); + cov_mark::check!(circular_mods); compute_crate_def_map( r#" //- /lib.rs diff --git a/crates/hir_def/src/path/lower/lower_use.rs b/crates/hir_def/src/path/lower/lower_use.rs index d584b0b70..e2965b033 100644 --- a/crates/hir_def/src/path/lower/lower_use.rs +++ b/crates/hir_def/src/path/lower/lower_use.rs @@ -6,7 +6,6 @@ use std::iter; use either::Either; use hir_expand::{hygiene::Hygiene, name::AsName}; use syntax::ast::{self, NameOwner}; -use test_utils::mark; use crate::path::{ImportAlias, ModPath, PathKind}; @@ -54,7 +53,7 @@ pub(crate) fn lower_use_tree( // FIXME: report errors somewhere // We get here if we do } else if is_glob { - mark::hit!(glob_enum_group); + cov_mark::hit!(glob_enum_group); if let Some(prefix) = prefix { cb(prefix, &tree, is_glob, None) } -- cgit v1.2.3