File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
compiler/rustc_session/src
tests/ui/invalid-compile-flags Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2640,9 +2640,13 @@ pub fn build_session_options(
26402640 handler. early_error ( "value for threads must be a positive non-zero integer" ) ;
26412641 }
26422642
2643- if unstable_opts. threads > 1 && unstable_opts. fuel . is_some ( ) {
2643+ let fuel = unstable_opts. fuel . is_some ( ) || unstable_opts. print_fuel . is_some ( ) ;
2644+ if fuel && unstable_opts. threads > 1 {
26442645 handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
26452646 }
2647+ if fuel && cg. incremental . is_some ( ) {
2648+ handler. early_error ( "optimization fuel is incompatible with incremental compilation" ) ;
2649+ }
26462650
26472651 let incremental = cg. incremental . as_ref ( ) . map ( PathBuf :: from) ;
26482652
Original file line number Diff line number Diff line change 1+ // revisions: incremental threads
2+ // dont-check-compiler-stderr
3+ //
4+ // [threads] compile-flags: -Zfuel=a=1 -Zthreads=2
5+ // [threads] error-pattern:optimization fuel is incompatible with multiple threads
6+ //
7+ // [incremental] incremental
8+ // [incremental] compile-flags: -Zprint-fuel=a
9+ // [incremental] error-pattern:optimization fuel is incompatible with incremental compilation
10+
11+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments