File tree 4 files changed +18
-0
lines changed
compiler/rustc_session/src
tests/ui/invalid-compile-flags
4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2640,6 +2640,10 @@ pub fn build_session_options(
2640
2640
handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
2641
2641
}
2642
2642
2643
+ if unstable_opts. fuel . is_some ( ) && cg. incremental . is_some ( ) {
2644
+ handler. early_error ( "optimization fuel is incompatible with incremental compilation" ) ;
2645
+ }
2646
+
2643
2647
let incremental = cg. incremental . as_ref ( ) . map ( PathBuf :: from) ;
2644
2648
2645
2649
let assert_incr_state = parse_assert_incr_state ( handler, & unstable_opts. assert_incr_state ) ;
Original file line number Diff line number Diff line change
1
+ error: optimization fuel is incompatible with incremental compilation
2
+
Original file line number Diff line number Diff line change
1
+ // revisions: incremental threads
2
+ //
3
+ // [threads] compile-flags: -Zfuel=a=1 -Zthreads=2
4
+ // [threads] error-pattern:optimization fuel is incompatible with multiple threads
5
+ //
6
+ // [incremental] incremental
7
+ // [incremental] compile-flags: -Zfuel=a=1
8
+ // [incremental] error-pattern:optimization fuel is incompatible with incremental compilation
9
+
10
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: optimization fuel is incompatible with multiple threads
2
+
You can’t perform that action at this time.
0 commit comments