Add a coverage mark
This commit is contained in:
parent
c7b1973a1d
commit
8bf4ecebfe
2 changed files with 2 additions and 0 deletions
|
|
@ -348,6 +348,7 @@ fn foo() {
|
|||
#[test]
|
||||
fn is_visible_from_same_def_map() {
|
||||
// Regression test for https://github.com/rust-analyzer/rust-analyzer/issues/9481
|
||||
cov_mark::check!(is_visible_from_same_block_def_map);
|
||||
check_at(
|
||||
r#"
|
||||
fn outer() {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ impl Visibility {
|
|||
let arc;
|
||||
let to_module_def_map =
|
||||
if to_module.krate == def_map.krate() && to_module.block == def_map.block_id() {
|
||||
cov_mark::hit!(is_visible_from_same_block_def_map);
|
||||
def_map
|
||||
} else {
|
||||
arc = to_module.def_map(db);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue