Store the gctxt instead of fetching it twice.

This commit is contained in:
Oli Scherer
2023-01-19 14:12:29 +00:00
parent 3ddb54f155
commit 261bbd7dba
3 changed files with 9 additions and 5 deletions

View File

@@ -815,7 +815,7 @@ fn main_args(at_args: &[String]) -> MainResult {
sess.fatal("Compilation failed, aborting rustdoc");
}
let global_ctxt = abort_on_err(queries.global_ctxt(), sess);
let mut global_ctxt = abort_on_err(queries.global_ctxt(), sess);
global_ctxt.enter(|tcx| {
let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {