Skip to content

Commit d704c1d

Browse files
committed
Remove -Zkeep-hygiene-data.
It was added way back in #28585 under the name `-Zkeep-mtwt-tables`. The justification was: > This is so that the resolution results can be used after analysis, > potentially for tool support. There are no uses of significance in the code base, and various Google searches for both option names (and variants) found nothing of interest. I think this can safely be removed.
1 parent fdaaaf9 commit d704c1d

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,7 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
444444
sess.time("drop_ast", || drop(krate));
445445

446446
// Discard hygiene data, which isn't required after lowering to HIR.
447-
if !sess.opts.unstable_opts.keep_hygiene_data {
448-
rustc_span::hygiene::clear_syntax_context_map();
449-
}
447+
rustc_span::hygiene::clear_syntax_context_map();
450448

451449
// Don't hash unless necessary, because it's expensive.
452450
let opt_hir_hash =

compiler/rustc_interface/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ fn test_unstable_options_tracking_hash() {
679679
untracked!(incremental_info, true);
680680
untracked!(incremental_verify_ich, true);
681681
untracked!(input_stats, true);
682-
untracked!(keep_hygiene_data, true);
683682
untracked!(link_native_libraries, false);
684683
untracked!(llvm_time_trace, true);
685684
untracked!(ls, vec!["all".to_owned()]);

compiler/rustc_session/src/options.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1622,8 +1622,6 @@ options! {
16221622
`=skip-entry`
16231623
`=skip-exit`
16241624
Multiple options can be combined with commas."),
1625-
keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED],
1626-
"keep hygiene data after analysis (default: no)"),
16271625
layout_seed: Option<u64> = (None, parse_opt_number, [TRACKED],
16281626
"seed layout randomization"),
16291627
link_directives: bool = (true, parse_bool, [TRACKED],

0 commit comments

Comments
 (0)