diff options
| author | bors <bors@rust-lang.org> | 2022-05-22 11:51:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-22 11:51:25 +0000 |
| commit | 4bb4dc4672b4d80509db4c0572ae8ceeaf7d4a1c (patch) | |
| tree | 5003fdc08fff12e544b5ed20d3e99fc7675ce9e9 /compiler/rustc_interface | |
| parent | 653463731a7f01f519cf85f444869def27f00395 (diff) | |
| parent | 09b4c7c89d6b815ad3032286a6ff380ecab95e33 (diff) | |
| download | rust-4bb4dc4672b4d80509db4c0572ae8ceeaf7d4a1c.tar.gz rust-4bb4dc4672b4d80509db4c0572ae8ceeaf7d4a1c.zip | |
Auto merge of #97251 - petrochenkov:eqtokens, r=nnethercote
rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast In the past falling back to reparsing pretty-printed strings was common, so some of this logic had to live in `rustc_parse`, but now the reparsing fallback is only used in two corner cases so we can move this logic to `rustc_ast` which makes many things simpler. It also helps to fix `MacArgs::inner_tokens` for `MacArgs::Eq` with non-literal expressions, which is done in the second commit. r? `@nnethercote`
Diffstat (limited to 'compiler/rustc_interface')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 00119267e85..afbf48fceb5 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -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)); |
