File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,9 @@ impl TestProps {
385385 }
386386
387387 if let Some ( edition) = config. parse_edition ( ln) {
388- self . compile_flags . push ( format ! ( "--edition={}" , edition. trim( ) ) ) ;
388+ // The edition is added at the start, since flags from //@compile-flags must
389+ // be passed to rustc last.
390+ self . compile_flags . insert ( 0 , format ! ( "--edition={}" , edition. trim( ) ) ) ;
389391 has_edition = true ;
390392 }
391393
@@ -606,7 +608,9 @@ impl TestProps {
606608 }
607609
608610 if let ( Some ( edition) , false ) = ( & config. edition , has_edition) {
609- self . compile_flags . push ( format ! ( "--edition={}" , edition) ) ;
611+ // The edition is added at the start, since flags from //@compile-flags must be passed
612+ // to rustc last.
613+ self . compile_flags . insert ( 0 , format ! ( "--edition={}" , edition) ) ;
610614 }
611615 }
612616
You can’t perform that action at this time.
0 commit comments