1
Fork 0

Update used_trait_imports

This commit is contained in:
John Kåre Alsaker 2018-11-30 20:02:56 +01:00
parent b1398a0de6
commit 28482db247
3 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ macro_rules! arena_types {
rustc::hir::def_id::DefId,
rustc::ty::subst::SubstsRef<$tcx>
)>,
[few] mir_keys: rustc::util::nodemap::DefIdSet,
[few, decode] mir_keys: rustc::util::nodemap::DefIdSet,
[decode] specialization_graph: rustc::traits::specialization_graph::Graph,
[] region_scope_tree: rustc::middle::region::ScopeTree,
[] item_local_set: rustc::util::nodemap::ItemLocalSet,

View file

@ -359,7 +359,7 @@ rustc_queries! {
}
Other {
query used_trait_imports(_: DefId) -> Lrc<DefIdSet> {}
query used_trait_imports(_: DefId) -> &'tcx DefIdSet {}
}
TypeChecking {

View file

@ -808,8 +808,8 @@ fn has_typeck_tables<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
fn used_trait_imports<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
def_id: DefId)
-> Lrc<DefIdSet> {
tcx.typeck_tables_of(def_id).used_trait_imports.clone()
-> &'tcx DefIdSet {
&*tcx.typeck_tables_of(def_id).used_trait_imports
}
fn typeck_tables_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,