Skip to content

Commit 059c9f2

Browse files
committed
-Zfuel is incompatible with incremental compilation
1 parent 09a6319 commit 059c9f2

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

compiler/rustc_session/src/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2640,6 +2640,10 @@ pub fn build_session_options(
26402640
handler.early_error("optimization fuel is incompatible with multiple threads");
26412641
}
26422642

2643+
if unstable_opts.fuel.is_some() && cg.incremental.is_some() {
2644+
handler.early_error("optimization fuel is incompatible with incremental compilation");
2645+
}
2646+
26432647
let incremental = cg.incremental.as_ref().map(PathBuf::from);
26442648

26452649
let assert_incr_state = parse_assert_incr_state(handler, &unstable_opts.assert_incr_state);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: optimization fuel is incompatible with incremental compilation
2+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: optimization fuel is incompatible with multiple threads
2+

0 commit comments

Comments
 (0)