File tree 1 file changed +7
-15
lines changed
compiler/rustc_metadata/src/rmeta
1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -2193,21 +2193,13 @@ pub fn encode_metadata(tcx: TyCtxt<'_>, path: &Path) {
2193
2193
// there's no need to do dep-graph tracking for any of it.
2194
2194
tcx. dep_graph . assert_ignored ( ) ;
2195
2195
2196
- join (
2197
- || encode_metadata_impl ( tcx, path) ,
2198
- || {
2199
- if tcx. sess . threads ( ) == 1 {
2200
- return ;
2201
- }
2202
- // Prefetch some queries used by metadata encoding.
2203
- // This is not necessary for correctness, but is only done for performance reasons.
2204
- // It can be removed if it turns out to cause trouble or be detrimental to performance.
2205
- join ( || prefetch_mir ( tcx) , || tcx. exported_symbols ( LOCAL_CRATE ) ) ;
2206
- } ,
2207
- ) ;
2208
- }
2209
-
2210
- fn encode_metadata_impl ( tcx : TyCtxt < ' _ > , path : & Path ) {
2196
+ if tcx. sess . threads ( ) != 1 {
2197
+ // Prefetch some queries used by metadata encoding.
2198
+ // This is not necessary for correctness, but is only done for performance reasons.
2199
+ // It can be removed if it turns out to cause trouble or be detrimental to performance.
2200
+ join ( || prefetch_mir ( tcx) , || tcx. exported_symbols ( LOCAL_CRATE ) ) ;
2201
+ }
2202
+
2211
2203
let mut encoder = opaque:: FileEncoder :: new ( path)
2212
2204
. unwrap_or_else ( |err| tcx. sess . emit_fatal ( FailCreateFileEncoder { err } ) ) ;
2213
2205
encoder. emit_raw_bytes ( METADATA_HEADER ) ;
You can’t perform that action at this time.
0 commit comments