From fdf2d2d9dc4740eb9d3d18c8a1d52c520c912565 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 21 Mar 2020 03:17:30 +0100 Subject: [PATCH] dep_graph.assert_ignored() -> rustc_interface --- src/librustc_ast_lowering/lib.rs | 7 ------- src/librustc_interface/passes.rs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index 5cd869f60ab..b333053f601 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -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::*; @@ -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 { diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index c331b1e3d1e..d3ed2fc89c1 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -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,