Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't clear the ident interner until lints are done #33754

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
@@ -257,9 +257,6 @@ pub fn compile_input(sess: &Session,
tcx.print_debug_stats();
}

// Discard interned strings as they are no longer required.
token::get_ident_interner().clear();

Ok((outputs, trans))
})??
};
@@ -1009,11 +1006,13 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
|| lint::check_crate(tcx, &analysis.access_levels));

// The above three passes generate errors w/o aborting
if sess.err_count() > 0 {
return Ok(f(tcx, Some(mir_map), analysis, Err(sess.err_count())));
}
let errors = if sess.err_count() == 0 { Ok(()) } else { Err(sess.err_count()) };

let result = f(tcx, Some(mir_map), analysis, errors);

Ok(f(tcx, Some(mir_map), analysis, Ok(())))
// Discard interned strings as they are no longer required.
token::get_ident_interner().clear();
Ok(result)
})
}