@@ -353,7 +353,7 @@ default_features = false
353
353
features = ["panic_unwind"]
354
354
355
355
[dependencies.test]
356
- "#,
356
+ "# ,
357
357
)
358
358
. unwrap ( ) ;
359
359
// The boring bits: a dummy project for xargo.
@@ -369,7 +369,7 @@ version = "0.0.0"
369
369
370
370
[lib]
371
371
path = "lib.rs"
372
- "#,
372
+ "# ,
373
373
)
374
374
. unwrap ( ) ;
375
375
File :: create ( dir. join ( "lib.rs" ) ) . unwrap ( ) ;
@@ -563,28 +563,29 @@ fn inside_cargo_rustc() {
563
563
// other args for target crates - that is, crates which are ultimately
564
564
// going to get interpreted by Miri.
565
565
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" ) ;
567
568
args. push ( "--sysroot" . to_owned ( ) ) ;
568
569
args. push ( sysroot) ;
569
570
args. splice ( 0 ..0 , miri:: miri_default_args ( ) . iter ( ) . map ( ToString :: to_string) ) ;
570
571
}
571
572
572
573
// Figure out the binary we need to call. If this is a runnable target crate, we want to call
573
574
// 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
+ } ;
588
589
589
590
// Run it.
590
591
command. args ( & args) ;
0 commit comments