File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -478,10 +478,6 @@ pub fn phase_1_parse_input<'a>(sess: &'a Session,
478478 cfg : ast:: CrateConfig ,
479479 input : & Input )
480480 -> PResult < ' a , ast:: Crate > {
481- // These may be left in an incoherent state after a previous compile.
482- syntax:: ext:: hygiene:: reset_hygiene_data ( ) ;
483- // `clear_ident_interner` can be used to free memory, but it does not restore the initial state.
484- token:: reset_ident_interner ( ) ;
485481 let continue_after_error = sess. opts . continue_parse_after_error ;
486482 sess. diagnostic ( ) . set_continue_after_error ( continue_after_error) ;
487483
@@ -1298,3 +1294,11 @@ pub fn build_output_filenames(input: &Input,
12981294 }
12991295 }
13001296}
1297+
1298+ // For use by the `rusti` project (https://github.com/murarth/rusti).
1299+ pub fn reset_thread_local_state ( ) {
1300+ // These may be left in an incoherent state after a previous compile.
1301+ syntax:: ext:: hygiene:: reset_hygiene_data ( ) ;
1302+ // `clear_ident_interner` can be used to free memory, but it does not restore the initial state.
1303+ token:: reset_ident_interner ( ) ;
1304+ }
You can’t perform that action at this time.
0 commit comments