File tree 1 file changed +6
-2
lines changed
src/tools/compiletest/src
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,9 @@ impl TestProps {
385
385
}
386
386
387
387
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( ) ) ) ;
389
391
has_edition = true ;
390
392
}
391
393
@@ -606,7 +608,9 @@ impl TestProps {
606
608
}
607
609
608
610
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) ) ;
610
614
}
611
615
}
612
616
You can’t perform that action at this time.
0 commit comments