From 0463d76a1f7370ea113bbf252281402fabc2a02b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 12 Jun 2021 23:39:57 +0300 Subject: internal: cross-crate cov-marks --- crates/hir_def/Cargo.toml | 2 +- crates/hir_ty/Cargo.toml | 2 +- crates/hir_ty/src/diagnostics/decl_check.rs | 2 ++ crates/ide/Cargo.toml | 3 +-- crates/ide/src/diagnostics.rs | 2 ++ crates/ide_assists/Cargo.toml | 2 +- crates/ide_completion/Cargo.toml | 2 +- crates/ide_db/Cargo.toml | 2 +- crates/ide_ssr/Cargo.toml | 2 +- crates/mbe/Cargo.toml | 2 +- crates/syntax/Cargo.toml | 2 +- 11 files changed, 13 insertions(+), 10 deletions(-) (limited to 'crates') diff --git a/crates/hir_def/Cargo.toml b/crates/hir_def/Cargo.toml index 43324d8d9..bb86f6a73 100644 --- a/crates/hir_def/Cargo.toml +++ b/crates/hir_def/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" dashmap = { version = "4.0.2", features = ["raw-api"] } log = "0.4.8" once_cell = "1.3.1" diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml index 4b714c6d8..a1894e8d8 100644 --- a/crates/hir_ty/Cargo.toml +++ b/crates/hir_ty/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" itertools = "0.10.0" arrayvec = "0.7" smallvec = "1.2.0" diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs index ca452e879..f26150b77 100644 --- a/crates/hir_ty/src/diagnostics/decl_check.rs +++ b/crates/hir_ty/src/diagnostics/decl_check.rs @@ -116,6 +116,7 @@ impl<'a> DeclValidator<'a> { fn validate_func(&mut self, func: FunctionId) { let data = self.db.function_data(func); if data.is_in_extern_block() { + cov_mark::hit!(extern_func_incorrect_case_ignored); return; } @@ -572,6 +573,7 @@ impl<'a> DeclValidator<'a> { fn validate_static(&mut self, static_id: StaticId) { let data = self.db.static_data(static_id); if data.is_extern { + cov_mark::hit!(extern_static_incorrect_case_ignored); return; } diff --git a/crates/ide/Cargo.toml b/crates/ide/Cargo.toml index 88f3d09d3..f12928225 100644 --- a/crates/ide/Cargo.toml +++ b/crates/ide/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" either = "1.5.3" indexmap = "1.4.0" itertools = "0.10.0" @@ -39,4 +39,3 @@ hir = { path = "../hir", version = "0.0.0" } [dev-dependencies] test_utils = { path = "../test_utils" } expect-test = "1.1" -cov-mark = "1.1.0" diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index e34341631..4193aabf5 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs @@ -2571,6 +2571,8 @@ trait BAD_TRAIT { #[test] fn ignores_extern_items() { + cov_mark::check!(extern_func_incorrect_case_ignored); + cov_mark::check!(extern_static_incorrect_case_ignored); check_diagnostics( r#" extern { diff --git a/crates/ide_assists/Cargo.toml b/crates/ide_assists/Cargo.toml index a83acb191..0d0d1605e 100644 --- a/crates/ide_assists/Cargo.toml +++ b/crates/ide_assists/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" rustc-hash = "1.1.0" itertools = "0.10.0" either = "1.6.1" diff --git a/crates/ide_completion/Cargo.toml b/crates/ide_completion/Cargo.toml index ba81c9e04..3c45fe1cb 100644 --- a/crates/ide_completion/Cargo.toml +++ b/crates/ide_completion/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" itertools = "0.10.0" log = "0.4.8" rustc-hash = "1.1.0" diff --git a/crates/ide_db/Cargo.toml b/crates/ide_db/Cargo.toml index 6229996ec..e219c577a 100644 --- a/crates/ide_db/Cargo.toml +++ b/crates/ide_db/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" log = "0.4.8" rayon = "1.5.0" fst = { version = "0.4", default-features = false } diff --git a/crates/ide_ssr/Cargo.toml b/crates/ide_ssr/Cargo.toml index 5d2221ebc..727d17bac 100644 --- a/crates/ide_ssr/Cargo.toml +++ b/crates/ide_ssr/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" rustc-hash = "1.1.0" itertools = "0.10.0" diff --git a/crates/mbe/Cargo.toml b/crates/mbe/Cargo.toml index 8856787c0..f3092d9aa 100644 --- a/crates/mbe/Cargo.toml +++ b/crates/mbe/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" rustc-hash = "1.1.0" smallvec = "1.2.0" log = "0.4.8" diff --git a/crates/syntax/Cargo.toml b/crates/syntax/Cargo.toml index 2106732cd..f1525a649 100644 --- a/crates/syntax/Cargo.toml +++ b/crates/syntax/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" doctest = false [dependencies] -cov-mark = { version = "1.1", features = ["thread-local"] } +cov-mark = "2.0.0-pre.1" itertools = "0.10.0" rowan = "=0.13.0-pre.6" rustc_lexer = { version = "721.0.0", package = "rustc-ap-rustc_lexer" } -- cgit v1.2.3