File tree Expand file tree Collapse file tree 1 file changed +13
-19
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -236,25 +236,19 @@ impl<'tcx> Queries<'tcx> {
236
236
}
237
237
238
238
pub fn linker ( & ' tcx self , ongoing_codegen : Box < dyn Any > ) -> Result < Linker > {
239
- let sess = self . session ( ) . clone ( ) ;
240
- let codegen_backend = self . codegen_backend ( ) . clone ( ) ;
241
-
242
- let ( crate_hash, prepare_outputs, dep_graph) = self . global_ctxt ( ) ?. enter ( |tcx| {
243
- (
244
- if tcx. needs_crate_hash ( ) { Some ( tcx. crate_hash ( LOCAL_CRATE ) ) } else { None } ,
245
- tcx. output_filenames ( ( ) ) . clone ( ) ,
246
- tcx. dep_graph . clone ( ) ,
247
- )
248
- } ) ;
249
-
250
- Ok ( Linker {
251
- sess,
252
- codegen_backend,
253
-
254
- dep_graph,
255
- prepare_outputs,
256
- crate_hash,
257
- ongoing_codegen,
239
+ self . global_ctxt ( ) ?. enter ( |tcx| {
240
+ Ok ( Linker {
241
+ sess : self . session ( ) . clone ( ) ,
242
+ codegen_backend : self . codegen_backend ( ) . clone ( ) ,
243
+ dep_graph : tcx. dep_graph . clone ( ) ,
244
+ prepare_outputs : tcx. output_filenames ( ( ) ) . clone ( ) ,
245
+ crate_hash : if tcx. needs_crate_hash ( ) {
246
+ Some ( tcx. crate_hash ( LOCAL_CRATE ) )
247
+ } else {
248
+ None
249
+ } ,
250
+ ongoing_codegen,
251
+ } )
258
252
} )
259
253
}
260
254
}
You can’t perform that action at this time.
0 commit comments