X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fty%2Ftrait_def.rs;h=a0b409bc4004ae85a64d99a3d0b92519dbad9428;hb=e83776f3ab90556db3004ab01a217fb06cdc8065;hp=58f21893de143699069bfad6bcf6572c7fcfdc7e;hpb=72bc62047f7fd9219bcd884d399c98463f2978ae;p=rust.git diff --git a/src/librustc/ty/trait_def.rs b/src/librustc/ty/trait_def.rs index 58f21893de1..a0b409bc400 100644 --- a/src/librustc/ty/trait_def.rs +++ b/src/librustc/ty/trait_def.rs @@ -10,7 +10,6 @@ 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 @@ pub fn all_impls(self, def_id: DefId) -> Vec { // Query provider for `trait_impls_of`. pub(super) fn trait_impls_of_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, trait_id: DefId) - -> Lrc { + -> &'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> for TraitImpls {