@@ -25,7 +25,7 @@ use super::{Decodable, DecodeIterator};
2525use crate :: creader:: { CStore , LoadedMacro } ;
2626use crate :: rmeta:: AttrFlags ;
2727use crate :: rmeta:: table:: IsDefault ;
28- use crate :: { foreign_modules, native_libs} ;
28+ use crate :: { eii , foreign_modules, native_libs} ;
2929
3030trait ProcessQueryValue < ' tcx , T > {
3131 fn process_decoded ( self , _tcx : TyCtxt < ' tcx > , _err : impl Fn ( ) -> !) -> T ;
@@ -330,9 +330,22 @@ provide! { tcx, def_id, other, cdata,
330330 is_private_dep => { cdata. private_dep }
331331 is_panic_runtime => { cdata. root. panic_runtime }
332332 is_compiler_builtins => { cdata. root. compiler_builtins }
333+
334+ // FIXME: to be replaced with externally_implementable_items below
333335 has_global_allocator => { cdata. root. has_global_allocator }
336+ // FIXME: to be replaced with externally_implementable_items below
334337 has_alloc_error_handler => { cdata. root. has_alloc_error_handler }
338+ // FIXME: to be replaced with externally_implementable_items below
335339 has_panic_handler => { cdata. root. has_panic_handler }
340+
341+ externally_implementable_items => {
342+ cdata. get_externally_implementable_items( tcx)
343+ . map( |( decl_did, ( decl, impls) ) | (
344+ decl_did,
345+ ( decl, impls. into_iter( ) . collect( ) )
346+ ) ) . collect( )
347+ }
348+
336349 is_profiler_runtime => { cdata. root. profiler_runtime }
337350 required_panic_strategy => { cdata. root. required_panic_strategy }
338351 panic_in_drop_strategy => { cdata. root. panic_in_drop_strategy }
@@ -430,6 +443,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
430443 } ,
431444 native_libraries : native_libs:: collect,
432445 foreign_modules : foreign_modules:: collect,
446+ externally_implementable_items : eii:: collect,
433447
434448 // Returns a map from a sufficiently visible external item (i.e., an
435449 // external item that is visible from at least one local module) to a
0 commit comments