1
Fork 0

rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast

This commit is contained in:
Vadim Petrochenkov 2022-05-21 15:50:39 +03:00
parent acfd327fd4
commit 8e8fb4f49e
14 changed files with 124 additions and 284 deletions

View file

@ -494,13 +494,7 @@ pub fn lower_to_hir<'res, 'tcx>(
arena: &'tcx rustc_ast_lowering::Arena<'tcx>,
) -> &'tcx Crate<'tcx> {
// Lower AST to HIR.
let hir_crate = rustc_ast_lowering::lower_crate(
sess,
&*krate,
resolver,
rustc_parse::nt_to_tokenstream,
arena,
);
let hir_crate = rustc_ast_lowering::lower_crate(sess, &*krate, resolver, arena);
// Drop AST to free memory
sess.time("drop_ast", || std::mem::drop(krate));