@@ -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 ;
@@ -329,9 +329,22 @@ provide! { tcx, def_id, other, cdata,
329329 is_private_dep => { cdata. private_dep }
330330 is_panic_runtime => { cdata. root. panic_runtime }
331331 is_compiler_builtins => { cdata. root. compiler_builtins }
332+
333+ // FIXME: to be replaced with externally_implementable_items below
332334 has_global_allocator => { cdata. root. has_global_allocator }
335+ // FIXME: to be replaced with externally_implementable_items below
333336 has_alloc_error_handler => { cdata. root. has_alloc_error_handler }
337+ // FIXME: to be replaced with externally_implementable_items below
334338 has_panic_handler => { cdata. root. has_panic_handler }
339+
340+ externally_implementable_items => {
341+ cdata. get_externally_implementable_items( tcx. sess)
342+ . map( |( decl_did, ( decl, impls) ) | (
343+ decl_did,
344+ ( decl, impls. into_iter( ) . collect( ) )
345+ ) ) . collect( )
346+ }
347+
335348 is_profiler_runtime => { cdata. root. profiler_runtime }
336349 required_panic_strategy => { cdata. root. required_panic_strategy }
337350 panic_in_drop_strategy => { cdata. root. panic_in_drop_strategy }
@@ -428,6 +441,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
428441 } ,
429442 native_libraries : native_libs:: collect,
430443 foreign_modules : foreign_modules:: collect,
444+ externally_implementable_items : eii:: collect,
431445
432446 // Returns a map from a sufficiently visible external item (i.e., an
433447 // external item that is visible from at least one local module) to a
0 commit comments