mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
internal: cross-crate cov-marks
This commit is contained in:
parent
124123a53b
commit
0463d76a1f
12 changed files with 15 additions and 12 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -245,9 +245,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cov-mark"
|
||||
version = "1.1.0"
|
||||
version = "2.0.0-pre.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ffa3d3e0138386cd4361f63537765cac7ee40698028844635a54495a92f67f3"
|
||||
checksum = "0d48d8f76bd9331f19fe2aaf3821a9f9fb32c3963e1e3d6ce82a8c09cef7444a"
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Reference in a new issue