diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-20 18:52:35 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-30 20:53:10 +0200 |
| commit | aa1bc5874eb43868151b1c2f667086547af65726 (patch) | |
| tree | 8650c8f7eff7e9de79c8e1b04398d4d6b7690590 /compiler/rustc_interface/src | |
| parent | 2f28737ebea5a330b9fd95b67d0f5fa6a7dac7cf (diff) | |
| download | rust-aa1bc5874eb43868151b1c2f667086547af65726.tar.gz rust-aa1bc5874eb43868151b1c2f667086547af65726.zip | |
Fix AST pretty.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 98394bee22c..63aa3db63ff 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -457,13 +457,13 @@ pub fn lower_to_hir<'res, 'tcx>( sess: &'tcx Session, lint_store: &LintStore, resolver: &'res mut Resolver<'_>, - krate: ast::Crate, + krate: Rc<ast::Crate>, arena: &'tcx rustc_ast_lowering::Arena<'tcx>, ) -> &'tcx Crate<'tcx> { // Lower AST to HIR. let hir_crate = rustc_ast_lowering::lower_crate( sess, - &krate, + &*krate, resolver, rustc_parse::nt_to_tokenstream, arena, @@ -779,7 +779,7 @@ impl<'tcx> QueryContext<'tcx> { pub fn create_global_ctxt<'tcx>( compiler: &'tcx Compiler, lint_store: Lrc<LintStore>, - krate: ast::Crate, + krate: Rc<ast::Crate>, dep_graph: DepGraph, resolver: Rc<RefCell<BoxedResolver>>, outputs: OutputFilenames, diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index b5fe8af1fd7..8a0964e6b9f 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -79,7 +79,7 @@ pub struct Queries<'tcx> { parse: Query<ast::Crate>, crate_name: Query<String>, register_plugins: Query<(ast::Crate, Lrc<LintStore>)>, - expansion: Query<(ast::Crate, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>, + expansion: Query<(Rc<ast::Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>, dep_graph: Query<DepGraph>, prepare_outputs: Query<OutputFilenames>, global_ctxt: Query<QueryContext<'tcx>>, @@ -167,7 +167,7 @@ impl<'tcx> Queries<'tcx> { pub fn expansion( &self, - ) -> Result<&Query<(ast::Crate, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>> { + ) -> Result<&Query<(Rc<ast::Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>> { tracing::trace!("expansion"); self.expansion.compute(|| { let crate_name = self.crate_name()?.peek().clone(); @@ -183,7 +183,7 @@ impl<'tcx> Queries<'tcx> { let krate = resolver.access(|resolver| { passes::configure_and_expand(&sess, &lint_store, krate, &crate_name, resolver) })?; - Ok((krate, Rc::new(RefCell::new(resolver)), lint_store)) + Ok((Rc::new(krate), Rc::new(RefCell::new(resolver)), lint_store)) }) } |
