Skip to content

Commit b6055a4

Browse files
Use local key in providers
1 parent cefdb1d commit b6055a4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bin/miri.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use log::debug;
2222

2323
use rustc_data_structures::sync::Lrc;
2424
use rustc_driver::Compilation;
25-
use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node};
25+
use rustc_hir::{self as hir, Node};
2626
use rustc_interface::interface::Config;
2727
use rustc_middle::{
2828
middle::exported_symbols::{
@@ -107,8 +107,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
107107
config.override_queries = Some(|_, local_providers, _| {
108108
// `exported_symbols` and `reachable_non_generics` provided by rustc always returns
109109
// an empty result if `tcx.sess.opts.output_types.should_codegen()` is false.
110-
local_providers.exported_symbols = |tcx, cnum| {
111-
assert_eq!(cnum, LOCAL_CRATE);
110+
local_providers.exported_symbols = |tcx, ()| {
112111
let reachable_set = tcx.with_stable_hashing_context(|hcx| {
113112
tcx.reachable_set(()).to_sorted(&hcx, true)
114113
});

0 commit comments

Comments
 (0)