Skip to content

Commit cbf71f7

Browse files
committed
Track verbose and verbose_internals
bjorn3 says: > On errors we don't finalize the incr comp cache, but non-fatal diagnostics are cached afaik. Otherwise we would have to replay the query in question, which we may not be able to do if the query key is not reconstructible from the dep node fingerprint. So we must track these flags to avoid replaying incorrect diagnostics.
1 parent aac51d5 commit cbf71f7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/rustc_interface/src/tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ fn assert_same_hash(x: &Options, y: &Options) {
9898
assert_same_clone(y);
9999
}
100100

101+
#[track_caller]
101102
fn assert_different_hash(x: &Options, y: &Options) {
102103
assert_ne!(x.dep_tracking_hash(true), y.dep_tracking_hash(true));
103104
assert_ne!(x.dep_tracking_hash(false), y.dep_tracking_hash(false));
@@ -713,7 +714,6 @@ fn test_unstable_options_tracking_hash() {
713714
untracked!(unpretty, Some("expanded".to_string()));
714715
untracked!(unstable_options, true);
715716
untracked!(validate_mir, true);
716-
untracked!(verbose_internals, true);
717717
untracked!(write_long_types_to_disk, false);
718718
// tidy-alphabetical-end
719719

@@ -845,6 +845,7 @@ fn test_unstable_options_tracking_hash() {
845845
};
846846
}
847847
tracked_no_crate_hash!(no_codegen, true);
848+
tracked_no_crate_hash!(verbose_internals, true);
848849
}
849850

850851
#[test]

compiler/rustc_session/src/options.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ top_level_options!(
224224
working_dir: RealFileName [TRACKED],
225225
color: ColorConfig [UNTRACKED],
226226

227-
verbose: bool [UNTRACKED],
227+
verbose: bool [TRACKED_NO_CRATE_HASH],
228228
}
229229
);
230230

@@ -1986,7 +1986,7 @@ written to standard error output)"),
19861986
validate_mir: bool = (false, parse_bool, [UNTRACKED],
19871987
"validate MIR after each transformation"),
19881988
#[rustc_lint_opt_deny_field_access("use `Session::verbose_internals` instead of this field")]
1989-
verbose_internals: bool = (false, parse_bool, [UNTRACKED],
1989+
verbose_internals: bool = (false, parse_bool, [TRACKED_NO_CRATE_HASH],
19901990
"in general, enable more debug printouts (default: no)"),
19911991
#[rustc_lint_opt_deny_field_access("use `Session::verify_llvm_ir` instead of this field")]
19921992
verify_llvm_ir: bool = (false, parse_bool, [TRACKED],

0 commit comments

Comments
 (0)