@@ -163,7 +163,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
163163 }
164164 is_mir_available => { cdata. is_item_mir_available( def_id. index) }
165165
166- dylib_dependency_formats => { Lrc :: new ( cdata. get_dylib_dependency_formats( ) ) }
166+ dylib_dependency_formats => { cdata. get_dylib_dependency_formats( tcx ) }
167167 is_panic_runtime => { cdata. root. panic_runtime }
168168 is_compiler_builtins => { cdata. root. compiler_builtins }
169169 has_global_allocator => { cdata. root. has_global_allocator }
@@ -172,8 +172,8 @@ provide! { <'tcx> tcx, def_id, other, cdata,
172172 is_profiler_runtime => { cdata. root. profiler_runtime }
173173 panic_strategy => { cdata. root. panic_strategy }
174174 extern_crate => {
175- let r = Lrc :: new ( * cdata. extern_crate. lock( ) ) ;
176- r
175+ let r = * cdata. extern_crate. lock( ) ;
176+ r. map ( |c| & * tcx . arena . alloc ( c ) )
177177 }
178178 is_no_builtins => { cdata. root. no_builtins }
179179 impl_defaultness => { cdata. get_impl_defaultness( def_id. index) }
@@ -190,7 +190,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
190190 } )
191191 . collect( ) ;
192192
193- Lrc :: new ( reachable_non_generics)
193+ tcx . arena . alloc ( reachable_non_generics)
194194 }
195195 native_libraries => { Lrc :: new( cdata. get_native_libraries( tcx. sess) ) }
196196 foreign_modules => { cdata. get_foreign_modules( tcx) }
0 commit comments