resolve: Remove visibility_untracked
This commit is contained in:
parent
d610b0c514
commit
17127f3e78
2 changed files with 4 additions and 11 deletions
|
@ -526,10 +526,6 @@ impl CStore {
|
||||||
self.get_crate_data(def.krate).get_ctor(def.index)
|
self.get_crate_data(def.krate).get_ctor(def.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn visibility_untracked(&self, def: DefId) -> Visibility<DefId> {
|
|
||||||
self.get_crate_data(def.krate).get_visibility(def.index)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn module_children_untracked<'a>(
|
pub fn module_children_untracked<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
def_id: DefId,
|
def_id: DefId,
|
||||||
|
|
|
@ -1007,18 +1007,15 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
|
||||||
// Record some extra data for better diagnostics.
|
// Record some extra data for better diagnostics.
|
||||||
match res {
|
match res {
|
||||||
Res::Def(DefKind::Struct, def_id) => {
|
Res::Def(DefKind::Struct, def_id) => {
|
||||||
let cstore = self.r.cstore();
|
let ctor = self.r.cstore().ctor_untracked(def_id);
|
||||||
if let Some((ctor_kind, ctor_def_id)) = cstore.ctor_untracked(def_id) {
|
if let Some((ctor_kind, ctor_def_id)) = ctor {
|
||||||
let ctor_res = Res::Def(DefKind::Ctor(CtorOf::Struct, ctor_kind), ctor_def_id);
|
let ctor_res = Res::Def(DefKind::Ctor(CtorOf::Struct, ctor_kind), ctor_def_id);
|
||||||
let ctor_vis = cstore.visibility_untracked(ctor_def_id);
|
let ctor_vis = self.r.tcx.visibility(ctor_def_id);
|
||||||
let field_visibilities =
|
let field_visibilities =
|
||||||
cstore.struct_field_visibilities_untracked(def_id).collect();
|
self.r.cstore().struct_field_visibilities_untracked(def_id).collect();
|
||||||
drop(cstore);
|
|
||||||
self.r
|
self.r
|
||||||
.struct_constructors
|
.struct_constructors
|
||||||
.insert(def_id, (ctor_res, ctor_vis, field_visibilities));
|
.insert(def_id, (ctor_res, ctor_vis, field_visibilities));
|
||||||
} else {
|
|
||||||
drop(cstore);
|
|
||||||
}
|
}
|
||||||
self.insert_field_names_extern(def_id)
|
self.insert_field_names_extern(def_id)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue