Make resolutions a query.

This commit is contained in:
Camille GILLOT 2021-04-04 14:40:35 +02:00
parent b09dad3edd
commit 071a047dc7
13 changed files with 127 additions and 112 deletions

View file

@ -2031,7 +2031,7 @@ pub fn provide(providers: &mut Providers) {
fn visibility(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Visibility {
let def_id = def_id.expect_local();
match tcx.visibilities.get(&def_id) {
match tcx.resolutions(()).visibilities.get(&def_id) {
Some(vis) => *vis,
None => {
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);