@@ -22,12 +22,13 @@ use log::debug;
22
22
23
23
use rustc_data_structures:: sync:: Lrc ;
24
24
use rustc_driver:: Compilation ;
25
- use rustc_hir:: { self as hir, def_id :: LOCAL_CRATE , Node } ;
25
+ use rustc_hir:: { self as hir, Node } ;
26
26
use rustc_interface:: interface:: Config ;
27
27
use rustc_middle:: {
28
28
middle:: exported_symbols:: {
29
29
ExportedSymbol , SymbolExportInfo , SymbolExportKind , SymbolExportLevel ,
30
30
} ,
31
+ query:: LocalCrate ,
31
32
ty:: { query:: ExternProviders , TyCtxt } ,
32
33
} ;
33
34
use rustc_session:: config:: OptLevel ;
@@ -124,8 +125,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
124
125
config. override_queries = Some ( |_, local_providers, _| {
125
126
// `exported_symbols` and `reachable_non_generics` provided by rustc always returns
126
127
// an empty result if `tcx.sess.opts.output_types.should_codegen()` is false.
127
- local_providers. exported_symbols = |tcx, cnum| {
128
- assert_eq ! ( cnum, LOCAL_CRATE ) ;
128
+ local_providers. exported_symbols = |tcx, LocalCrate | {
129
129
let reachable_set = tcx. with_stable_hashing_context ( |hcx| {
130
130
tcx. reachable_set ( ( ) ) . to_sorted ( & hcx, true )
131
131
} ) ;
0 commit comments