diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-11 18:55:14 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-30 20:31:56 +0200 |
| commit | c520cf225310e0d1d3ebf513034255cee3f76e30 (patch) | |
| tree | b930748d4b1b820eabcacce326f389cf2307e700 /compiler/rustc_interface/src | |
| parent | e05cd155feaafec2b94cd11083e8425094ad8806 (diff) | |
| download | rust-c520cf225310e0d1d3ebf513034255cee3f76e30.tar.gz rust-c520cf225310e0d1d3ebf513034255cee3f76e30.zip | |
Arena-allocate Crate during lowering.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index e08c8faaa52..f5a085250a6 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -460,7 +460,7 @@ pub fn lower_to_hir<'res, 'tcx>( resolver: &'res mut Resolver<'_>, krate: &'res ast::Crate, arena: &'tcx rustc_ast_lowering::Arena<'tcx>, -) -> Crate<'tcx> { +) -> &'tcx Crate<'tcx> { // Lower AST to HIR. let hir_crate = rustc_ast_lowering::lower_crate( sess, @@ -796,7 +796,6 @@ pub fn create_global_ctxt<'tcx>( let krate = resolver .borrow_mut() .access(|resolver| lower_to_hir(sess, &lint_store, resolver, krate, hir_arena)); - let krate = &*hir_arena.alloc(krate); let resolver_outputs = BoxedResolver::to_resolver_outputs(resolver); let query_result_on_disk_cache = rustc_incremental::load_query_result_cache(sess); |
