Skip to content

Commit bf77f52

Browse files
committed
Auto merge of #2808 - saethlin:rustup, r=oli-obk
Rustup
2 parents 0ba1f4a + 31afa73 commit bf77f52

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
04e957578c77c95a0505f5818d0068b459f673e3
1+
ff4b772f805ec1e1c1bd7e189ab8d5a4e3a6ef13

src/bin/miri.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
109109
// an empty result if `tcx.sess.opts.output_types.should_codegen()` is false.
110110
local_providers.exported_symbols = |tcx, cnum| {
111111
assert_eq!(cnum, LOCAL_CRATE);
112+
let reachable_set = tcx.with_stable_hashing_context(|hcx| {
113+
tcx.reachable_set(()).to_sorted(&hcx, true)
114+
});
112115
tcx.arena.alloc_from_iter(
113116
// This is based on:
114117
// https://github.com/rust-lang/rust/blob/2962e7c0089d5c136f4e9600b7abccfbbde4973d/compiler/rustc_codegen_ssa/src/back/symbol_export.rs#L62-L63
115118
// https://github.com/rust-lang/rust/blob/2962e7c0089d5c136f4e9600b7abccfbbde4973d/compiler/rustc_codegen_ssa/src/back/symbol_export.rs#L174
116-
tcx.reachable_set(()).iter().filter_map(|&local_def_id| {
119+
reachable_set.into_iter().filter_map(|&local_def_id| {
117120
// Do the same filtering that rustc does:
118121
// https://github.com/rust-lang/rust/blob/2962e7c0089d5c136f4e9600b7abccfbbde4973d/compiler/rustc_codegen_ssa/src/back/symbol_export.rs#L84-L102
119122
// Otherwise it may cause unexpected behaviours and ICEs

0 commit comments

Comments
 (0)