From bf86fd522114d8064360682bacd23327a84dbfa4 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Fri, 22 Jan 2021 10:31:18 -0500 Subject: [PATCH] Fix queries This happened because `alloc_query_strings` was never called. --- src/librustdoc/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 719aca612f50..19d2de58ffb0 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -568,7 +568,7 @@ fn main_options(options: config::Options) -> MainResult { info!("going to format"); let (error_format, edition, debugging_options) = diag_opts; let diag = core::new_handler(error_format, None, &debugging_options); - match output_format { + let main_result = match output_format { None | Some(config::OutputFormat::Html) => sess.time("render_html", || { run_renderer::>( krate, @@ -589,7 +589,10 @@ fn main_options(options: config::Options) -> MainResult { tcx, ) }), - } + }; + // NOTE: this is normally called in codegen, but rustdoc never goes to codegen. + tcx.alloc_self_profile_query_strings(); + main_result }) }) })