]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/trait_def.rs
Auto merge of #61300 - indygreg:upgrade-cross-make, r=sanxiyn
[rust.git] / src / librustc / ty / trait_def.rs
index 58f21893de143699069bfad6bcf6572c7fcfdc7e..a0b409bc4004ae85a64d99a3d0b92519dbad9428 100644 (file)
@@ -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<DefId> {
 // 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 {