mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
hir_ty: add coverage testing for autoderef_visibility_method test
This commit is contained in:
parent
2dc85f739a
commit
42abfa0f88
2 changed files with 2 additions and 0 deletions
|
@ -687,6 +687,7 @@ fn is_valid_candidate(
|
|||
}
|
||||
if let Some(from_module) = visible_from_module {
|
||||
if !db.fn_visibility(m).is_visible_from(db.upcast(), from_module) {
|
||||
cov_mark::hit!(autoderef_candidate_not_visible);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1227,6 +1227,7 @@ mod b {
|
|||
|
||||
#[test]
|
||||
fn autoderef_visibility_method() {
|
||||
cov_mark::check!(autoderef_candidate_not_visible);
|
||||
check_infer(
|
||||
r#"
|
||||
#[lang = "deref"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue