Update trait_impls_of
This commit is contained in:
parent
1fe0d4e383
commit
b164a2da63
@ -19,6 +19,7 @@ macro_rules! arena_types {
|
||||
[] region_scope_tree: rustc::middle::region::ScopeTree,
|
||||
[] item_local_set: rustc::util::nodemap::ItemLocalSet,
|
||||
[decode] mir_const_qualif: rustc_data_structures::bit_set::BitSet<rustc::mir::Local>,
|
||||
[] trait_impls_of: rustc::ty::trait_def::TraitImpls,
|
||||
], $tcx);
|
||||
)
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ rustc_queries! {
|
||||
}
|
||||
|
||||
TypeChecking {
|
||||
query trait_impls_of(key: DefId) -> Lrc<ty::trait_def::TraitImpls> {
|
||||
query trait_impls_of(key: DefId) -> &'tcx ty::trait_def::TraitImpls {
|
||||
desc { |tcx| "trait impls of `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
query specialization_graph_of(_: DefId) -> &'tcx specialization_graph::Graph {}
|
||||
|
@ -10,7 +10,6 @@ use crate::ty::{Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher,
|
||||
StableHasherResult};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_macros::HashStable;
|
||||
|
||||
/// A trait's definition with type information.
|
||||
@ -151,7 +150,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
// Query provider for `trait_impls_of`.
|
||||
pub(super) fn trait_impls_of_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
trait_id: DefId)
|
||||
-> Lrc<TraitImpls> {
|
||||
-> &'tcx TraitImpls {
|
||||
let mut impls = TraitImpls::default();
|
||||
|
||||
{
|
||||
@ -188,7 +187,7 @@ pub(super) fn trait_impls_of_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
}
|
||||
}
|
||||
|
||||
Lrc::new(impls)
|
||||
tcx.arena.alloc(impls)
|
||||
}
|
||||
|
||||
impl<'a> HashStable<StableHashingContext<'a>> for TraitImpls {
|
||||
|
Loading…
x
Reference in New Issue
Block a user