File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
- 04e957578c77c95a0505f5818d0068b459f673e3
1
+ ff4b772f805ec1e1c1bd7e189ab8d5a4e3a6ef13
Original file line number Diff line number Diff line change @@ -109,11 +109,14 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
109
109
// an empty result if `tcx.sess.opts.output_types.should_codegen()` is false.
110
110
local_providers. exported_symbols = |tcx, cnum| {
111
111
assert_eq ! ( cnum, LOCAL_CRATE ) ;
112
+ let reachable_set = tcx. with_stable_hashing_context ( |hcx| {
113
+ tcx. reachable_set ( ( ) ) . to_sorted ( & hcx, true )
114
+ } ) ;
112
115
tcx. arena . alloc_from_iter (
113
116
// This is based on:
114
117
// https://github.com/rust-lang/rust/blob/2962e7c0089d5c136f4e9600b7abccfbbde4973d/compiler/rustc_codegen_ssa/src/back/symbol_export.rs#L62-L63
115
118
// 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| {
117
120
// Do the same filtering that rustc does:
118
121
// https://github.com/rust-lang/rust/blob/2962e7c0089d5c136f4e9600b7abccfbbde4973d/compiler/rustc_codegen_ssa/src/back/symbol_export.rs#L84-L102
119
122
// Otherwise it may cause unexpected behaviours and ICEs
You can’t perform that action at this time.
0 commit comments