@@ -24,7 +24,7 @@ use super::{Decodable, DecodeContext, DecodeIterator};
24
24
use crate :: creader:: { CStore , LoadedMacro } ;
25
25
use crate :: rmeta:: AttrFlags ;
26
26
use crate :: rmeta:: table:: IsDefault ;
27
- use crate :: { foreign_modules, native_libs} ;
27
+ use crate :: { eii , foreign_modules, native_libs} ;
28
28
29
29
trait ProcessQueryValue < ' tcx , T > {
30
30
fn process_decoded ( self , _tcx : TyCtxt < ' tcx > , _err : impl Fn ( ) -> !) -> T ;
@@ -328,9 +328,22 @@ provide! { tcx, def_id, other, cdata,
328
328
is_private_dep => { cdata. private_dep }
329
329
is_panic_runtime => { cdata. root. panic_runtime }
330
330
is_compiler_builtins => { cdata. root. compiler_builtins }
331
+
332
+ // FIXME: to be replaced with externally_implementable_items below
331
333
has_global_allocator => { cdata. root. has_global_allocator }
334
+ // FIXME: to be replaced with externally_implementable_items below
332
335
has_alloc_error_handler => { cdata. root. has_alloc_error_handler }
336
+ // FIXME: to be replaced with externally_implementable_items below
333
337
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
+
334
347
is_profiler_runtime => { cdata. root. profiler_runtime }
335
348
required_panic_strategy => { cdata. root. required_panic_strategy }
336
349
panic_in_drop_strategy => { cdata. root. panic_in_drop_strategy }
@@ -427,6 +440,7 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
427
440
} ,
428
441
native_libraries : native_libs:: collect,
429
442
foreign_modules : foreign_modules:: collect,
443
+ externally_implementable_items : eii:: collect,
430
444
431
445
// Returns a map from a sufficiently visible external item (i.e., an
432
446
// external item that is visible from at least one local module) to a
0 commit comments