@@ -353,7 +353,7 @@ default_features = false
353353features = ["panic_unwind"]
354354
355355[dependencies.test]
356- "#,
356+ "# ,
357357 )
358358 . unwrap ( ) ;
359359 // The boring bits: a dummy project for xargo.
@@ -369,7 +369,7 @@ version = "0.0.0"
369369
370370[lib]
371371path = "lib.rs"
372- "#,
372+ "# ,
373373 )
374374 . unwrap ( ) ;
375375 File :: create ( dir. join ( "lib.rs" ) ) . unwrap ( ) ;
@@ -563,28 +563,29 @@ fn inside_cargo_rustc() {
563563 // other args for target crates - that is, crates which are ultimately
564564 // going to get interpreted by Miri.
565565 if target_crate {
566- let sysroot = std:: env:: var ( "MIRI_SYSROOT" ) . expect ( "The wrapper should have set MIRI_SYSROOT" ) ;
566+ let sysroot =
567+ std:: env:: var ( "MIRI_SYSROOT" ) . expect ( "The wrapper should have set MIRI_SYSROOT" ) ;
567568 args. push ( "--sysroot" . to_owned ( ) ) ;
568569 args. push ( sysroot) ;
569570 args. splice ( 0 ..0 , miri:: miri_default_args ( ) . iter ( ) . map ( ToString :: to_string) ) ;
570571 }
571572
572573 // Figure out the binary we need to call. If this is a runnable target crate, we want to call
573574 // Miri to start interpretation; otherwise we want to call rustc to build the crate as usual.
574- let mut command =
575- if target_crate && is_runnable_crate ( ) {
576- // This is the 'target crate' - the binary or test crate that
577- // we want to interpret under Miri. We deserialize the user-provided arguments
578- // from the special environment variable "MIRI_ARGS", and feed them
579- // to the 'miri' binary.
580- let magic = std :: env :: var ( "MIRI_ARGS" ) . expect ( "missing MIRI_ARGS" ) ;
581- let mut user_args : Vec < String > = serde_json:: from_str ( & magic) . expect ( "failed to deserialize MIRI_ARGS" ) ;
582- args. append ( & mut user_args) ;
583- // Run this in Miri.
584- Command :: new ( find_miri ( ) )
585- } else {
586- Command :: new ( "rustc" )
587- } ;
575+ let mut command = if target_crate && is_runnable_crate ( ) {
576+ // This is the 'target crate' - the binary or test crate that
577+ // we want to interpret under Miri. We deserialize the user-provided arguments
578+ // from the special environment variable "MIRI_ARGS", and feed them
579+ // to the 'miri' binary.
580+ let magic = std :: env :: var ( "MIRI_ARGS" ) . expect ( "missing MIRI_ARGS" ) ;
581+ let mut user_args : Vec < String > =
582+ serde_json:: from_str ( & magic) . expect ( "failed to deserialize MIRI_ARGS" ) ;
583+ args. append ( & mut user_args) ;
584+ // Run this in Miri.
585+ Command :: new ( find_miri ( ) )
586+ } else {
587+ Command :: new ( "rustc" )
588+ } ;
588589
589590 // Run it.
590591 command. args ( & args) ;
0 commit comments