Review nits.
This commit is contained in:
parent
68b1ac9874
commit
144d1c2171
4 changed files with 5 additions and 11 deletions
|
|
@ -393,9 +393,6 @@ pub fn run_compiler(
|
|||
|
||||
queries.ongoing_codegen()?;
|
||||
|
||||
// Drop GlobalCtxt after starting codegen to free memory
|
||||
mem::drop(queries.global_ctxt()?.take());
|
||||
|
||||
if sess.opts.debugging_opts.print_type_sizes {
|
||||
sess.code_stats.print_type_sizes();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ impl Linker {
|
|||
|
||||
impl Compiler {
|
||||
pub fn enter<F, T>(&self, f: F) -> T
|
||||
where F: for<'q> FnOnce(&'q Queries<'_>) -> T
|
||||
where F: FnOnce(&Queries<'_>) -> T
|
||||
{
|
||||
let queries = Queries::new(&self);
|
||||
f(&queries)
|
||||
|
|
@ -345,9 +345,6 @@ impl Compiler {
|
|||
|
||||
queries.ongoing_codegen()?;
|
||||
|
||||
// Drop GlobalCtxt after starting codegen to free memory.
|
||||
mem::drop(queries.global_ctxt()?.take());
|
||||
|
||||
let linker = queries.linker()?;
|
||||
Ok(Some(linker))
|
||||
})?;
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
|||
registry: rustc_driver::diagnostics_registry(),
|
||||
};
|
||||
|
||||
interface::run_compiler_in_existing_thread_pool(config, |compiler| { compiler.enter(|queries| {
|
||||
interface::run_compiler_in_existing_thread_pool(config, |compiler| compiler.enter(|queries| {
|
||||
let sess = compiler.session();
|
||||
|
||||
// We need to hold on to the complete resolver, so we cause everything to be
|
||||
|
|
@ -487,7 +487,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
|||
|
||||
(krate, ctxt.renderinfo.into_inner(), render_options)
|
||||
})
|
||||
}) })
|
||||
}))
|
||||
}
|
||||
|
||||
/// `DefId` or parameter index (`ty::ParamTy.index`) of a synthetic type parameter
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ pub fn run(options: Options) -> i32 {
|
|||
let mut test_args = options.test_args.clone();
|
||||
let display_warnings = options.display_warnings;
|
||||
|
||||
let tests = interface::run_compiler(config, |compiler| { compiler.enter(|queries| {
|
||||
let tests = interface::run_compiler(config, |compiler| compiler.enter(|queries| {
|
||||
let lower_to_hir = queries.lower_to_hir()?;
|
||||
|
||||
let mut opts = scrape_test_config(lower_to_hir.peek().0.borrow().krate());
|
||||
|
|
@ -119,7 +119,7 @@ pub fn run(options: Options) -> i32 {
|
|||
|
||||
let ret : Result<_, ErrorReported> = Ok(collector.tests);
|
||||
ret
|
||||
}) }).expect("compiler aborted in rustdoc!");
|
||||
})).expect("compiler aborted in rustdoc!");
|
||||
|
||||
test_args.insert(0, "rustdoctest".to_string());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue