Merge #9501
9501: internal: Add a coverage mark r=jonas-schievink a=jonas-schievink https://github.com/rust-analyzer/rust-analyzer/pull/9499#discussion_r663966671 bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
8b8eac5bf9
@ -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…
x
Reference in New Issue
Block a user