@@ -521,46 +521,8 @@ fn phase_cargo_miri(mut args: env::Args) {
521521 & host
522522 } ;
523523
524- // Forward all further arguments. We do some processing here because we want to
525- // detect people still using the old way of passing flags to Miri
526- // (`cargo miri -- -Zmiri-foo`).
527- while let Some ( arg) = args. next ( ) {
528- cmd. arg ( & arg) ;
529- if arg == "--" {
530- // Check if the next argument starts with `-Zmiri`. If yes, we assume
531- // this is an old-style invocation.
532- if let Some ( next_arg) = args. next ( ) {
533- if next_arg. starts_with ( "-Zmiri" ) || next_arg == "--" {
534- eprintln ! (
535- "WARNING: it seems like you are setting Miri's flags in `cargo miri` the old way,\n \
536- i.e., by passing them after the first `--`. This style is deprecated; please set\n \
537- the MIRIFLAGS environment variable instead. `cargo miri run/test` now interprets\n \
538- arguments the exact same way as `cargo run/test`."
539- ) ;
540- // Old-style invocation. Turn these into MIRIFLAGS, if there are any.
541- if next_arg != "--" {
542- let mut miriflags = env:: var ( "MIRIFLAGS" ) . unwrap_or_default ( ) ;
543- miriflags. push ( ' ' ) ;
544- miriflags. push_str ( & next_arg) ;
545- while let Some ( further_arg) = args. next ( ) {
546- if further_arg == "--" {
547- // End of the Miri flags!
548- break ;
549- }
550- miriflags. push ( ' ' ) ;
551- miriflags. push_str ( & further_arg) ;
552- }
553- env:: set_var ( "MIRIFLAGS" , miriflags) ;
554- }
555- // Pass the remaining flags to cargo.
556- cmd. args ( args) ;
557- break ;
558- }
559- // Not a Miri argument after all, make sure we pass it to cargo.
560- cmd. arg ( next_arg) ;
561- }
562- }
563- }
524+ // Forward all further arguments to cargo.
525+ cmd. args ( args) ;
564526
565527 // Set `RUSTC_WRAPPER` to ourselves. Cargo will prepend that binary to its usual invocation,
566528 // i.e., the first argument is `rustc` -- which is what we use in `main` to distinguish
0 commit comments