@@ -271,27 +271,29 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> {
271271 ) ?;
272272
273273 match file_types {
274- Some ( types) => for file_type in types {
275- let path = out_dir. join ( file_type. filename ( & file_stem) ) ;
276- let hardlink = link_stem
277- . as_ref ( )
278- . map ( |& ( ref ld, ref ls) | ld. join ( file_type. filename ( ls) ) ) ;
279- let export_path = if unit. target . is_custom_build ( ) {
280- None
281- } else {
282- self . export_dir . as_ref ( ) . and_then ( |export_dir| {
283- hardlink. as_ref ( ) . and_then ( |hardlink| {
284- Some ( export_dir. join ( hardlink. file_name ( ) . unwrap ( ) ) )
274+ Some ( types) => {
275+ for file_type in types {
276+ let path = out_dir. join ( file_type. filename ( & file_stem) ) ;
277+ let hardlink = link_stem
278+ . as_ref ( )
279+ . map ( |& ( ref ld, ref ls) | ld. join ( file_type. filename ( ls) ) ) ;
280+ let export_path = if unit. target . is_custom_build ( ) {
281+ None
282+ } else {
283+ self . export_dir . as_ref ( ) . and_then ( |export_dir| {
284+ hardlink. as_ref ( ) . and_then ( |hardlink| {
285+ Some ( export_dir. join ( hardlink. file_name ( ) . unwrap ( ) ) )
286+ } )
285287 } )
286- } )
287- } ;
288- ret . push ( OutputFile {
289- path ,
290- hardlink ,
291- export_path ,
292- flavor : file_type . flavor ,
293- } ) ;
294- } ,
288+ } ;
289+ ret . push ( OutputFile {
290+ path ,
291+ hardlink ,
292+ export_path ,
293+ flavor : file_type . flavor ,
294+ } ) ;
295+ }
296+ }
295297 // not supported, don't worry about it
296298 None => {
297299 unsupported. push ( crate_type. to_string ( ) ) ;
@@ -392,7 +394,8 @@ fn compute_metadata<'a, 'cfg>(
392394 let bcx = & cx. bcx ;
393395 let __cargo_default_lib_metadata = env:: var ( "__CARGO_DEFAULT_LIB_METADATA" ) ;
394396 if !( unit. mode . is_any_test ( ) || unit. mode . is_check ( ) )
395- && ( unit. target . is_dylib ( ) || unit. target . is_cdylib ( )
397+ && ( unit. target . is_dylib ( )
398+ || unit. target . is_cdylib ( )
396399 || ( unit. target . is_bin ( ) && bcx. target_triple ( ) . starts_with ( "wasm32-" ) ) )
397400 && unit. pkg . package_id ( ) . source_id ( ) . is_path ( )
398401 && __cargo_default_lib_metadata. is_err ( )
@@ -433,7 +436,8 @@ fn compute_metadata<'a, 'cfg>(
433436
434437 // Mix in the target-metadata of all the dependencies of this target
435438 {
436- let mut deps_metadata = cx. dep_targets ( unit)
439+ let mut deps_metadata = cx
440+ . dep_targets ( unit)
437441 . iter ( )
438442 . map ( |dep| metadata_of ( dep, cx, metas) )
439443 . collect :: < Vec < _ > > ( ) ;
0 commit comments