hir_def: move visibility queries from hir_ty to hir_def

This commit is contained in:
cynecx 2021-03-24 22:59:59 +01:00
parent 42abfa0f88
commit 96c88680b2
5 changed files with 43 additions and 35 deletions

View file

@ -686,7 +686,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) {
if !db.function_visibility(m).is_visible_from(db.upcast(), from_module) {
cov_mark::hit!(autoderef_candidate_not_visible);
return false;
}