@@ -24,7 +24,7 @@ use super::{Decodable, DecodeContext, DecodeIterator};
2424use crate :: creader:: { CStore , LoadedMacro } ;
2525use crate :: rmeta:: AttrFlags ;
2626use crate :: rmeta:: table:: IsDefault ;
27- use crate :: { foreign_modules, native_libs} ;
27+ use crate :: { eii , foreign_modules, native_libs} ;
2828
2929trait ProcessQueryValue < ' tcx , T > {
3030 fn process_decoded ( self , _tcx : TyCtxt < ' tcx > , _err : impl Fn ( ) -> !) -> T ;
@@ -328,9 +328,22 @@ provide! { tcx, def_id, other, cdata,
328328 is_private_dep => { cdata. private_dep }
329329 is_panic_runtime => { cdata. root. panic_runtime }
330330 is_compiler_builtins => { cdata. root. compiler_builtins }
331+
332+ // FIXME: to be replaced with externally_implementable_items below
331333 has_global_allocator => { cdata. root. has_global_allocator }
334+ // FIXME: to be replaced with externally_implementable_items below
332335 has_alloc_error_handler => { cdata. root. has_alloc_error_handler }
336+ // FIXME: to be replaced with externally_implementable_items below
333337 has_panic_handler => { cdata. root. has_panic_handler }
338+
339+ externally_implementable_items => {
340+ cdata. get_externally_implementable_items( tcx. sess)
341+ . map( |( decl_did, ( decl, impls) ) | (
342+ decl_did,
343+ ( decl, impls. into_iter( ) . collect( ) )
344+ ) ) . collect( )
345+ }
346+
334347 is_profiler_runtime => { cdata. root. profiler_runtime }
335348 required_panic_strategy => { cdata. root. required_panic_strategy }
336349 panic_in_drop_strategy => { cdata. root. panic_in_drop_strategy }
@@ -427,6 +440,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
427440 } ,
428441 native_libraries : native_libs:: collect,
429442 foreign_modules : foreign_modules:: collect,
443+ externally_implementable_items : eii:: collect,
430444
431445 // Returns a map from a sufficiently visible external item (i.e., an
432446 // external item that is visible from at least one local module) to a
0 commit comments