Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liberate rustc_ast_lowering from rustc #70204

Merged
merged 11 commits into from
Mar 23, 2020
Prev Previous commit
Next Next commit
dep_graph.assert_ignored() -> rustc_interface
  • Loading branch information
Centril committed Mar 21, 2020
commit fdf2d2d9dc4740eb9d3d18c8a1d52c520c912565
7 changes: 0 additions & 7 deletions src/librustc_ast_lowering/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#![feature(specialization)]
#![recursion_limit = "256"]

use rustc::dep_graph::DepGraph;
use rustc::hir::map::definitions::{DefKey, DefPathData, Definitions};
use rustc_ast::ast;
use rustc_ast::ast::*;
Expand Down Expand Up @@ -261,17 +260,11 @@ impl<'a> ImplTraitContext<'_, 'a> {

pub fn lower_crate<'a, 'hir>(
sess: &'a Session,
dep_graph: &'a DepGraph,
krate: &'a Crate,
resolver: &'a mut dyn Resolver,
nt_to_tokenstream: NtToTokenstream,
arena: &'hir Arena<'hir>,
) -> hir::Crate<'hir> {
// We're constructing the HIR here; we don't care what we will
// read, since we haven't even constructed the *input* to
// incr. comp. yet.
dep_graph.assert_ignored();

let _prof_timer = sess.prof.verbose_generic_activity("hir_lowering");

LoweringContext {
Expand Down
6 changes: 5 additions & 1 deletion src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,14 @@ pub fn lower_to_hir<'res, 'tcx>(
krate: &'res ast::Crate,
arena: &'tcx rustc_ast_lowering::Arena<'tcx>,
) -> Crate<'tcx> {
// We're constructing the HIR here; we don't care what we will
// read, since we haven't even constructed the *input* to
// incr. comp. yet.
dep_graph.assert_ignored();

// Lower AST to HIR.
let hir_crate = rustc_ast_lowering::lower_crate(
sess,
&dep_graph,
&krate,
resolver,
rustc_parse::nt_to_tokenstream,
Expand Down