Skip to content

Commit

Permalink
ignore dep-graph in resolve and lower_crate
Browse files Browse the repository at this point in the history
This got removed at some point, it seems.
  • Loading branch information
nikomatsakis committed May 18, 2016
1 parent b711734 commit 7734308
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/librustc/hir/lowering.rs
Expand Up @@ -45,6 +45,7 @@ use hir::map::Definitions;
use hir::map::definitions::DefPathData;
use hir::def_id::{DefIndex, DefId};
use hir::def::{Def, PathResolution};
use session::Session;

use std::collections::BTreeMap;
use std::iter;
Expand Down Expand Up @@ -97,8 +98,16 @@ impl Resolver for DummyResolver {
}
}

pub fn lower_crate(krate: &Crate, id_assigner: &NodeIdAssigner, resolver: &mut Resolver)
pub fn lower_crate(sess: &Session,
krate: &Crate,
id_assigner: &NodeIdAssigner,
resolver: &mut Resolver)
-> hir::Crate {
// 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.
let _ignore = sess.dep_graph.in_ignore();

LoweringContext {
crate_root: if std_inject::no_core(krate) {
None
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/driver.rs
Expand Up @@ -814,7 +814,7 @@ pub fn lower_and_resolve<'a>(sess: &Session,

// Lower ast -> hir.
let hir_forest = time(sess.time_passes(), "lowering ast -> hir", || {
hir_map::Forest::new(lower_crate(krate, sess, &mut resolver), dep_graph)
hir_map::Forest::new(lower_crate(sess, krate, sess, &mut resolver), dep_graph)
});

(ty::CrateAnalysis {
Expand Down
1 change: 1 addition & 0 deletions src/librustc_resolve/lib.rs
Expand Up @@ -3624,6 +3624,7 @@ pub fn resolve_crate<'a, 'b>(resolver: &'b mut Resolver<'a>, krate: &'b Crate) {
// reflects not just its contents but the results of name
// resolution on those contents. Hopefully we'll push this back at
// some point.
let _ignore = resolver.session.dep_graph.in_ignore();

resolver.build_reduced_graph(krate);
resolve_imports::resolve_imports(resolver);
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/test.rs
Expand Up @@ -101,7 +101,7 @@ pub fn run(input: &str,
let defs = hir_map::collect_definitions(&krate);

let mut dummy_resolver = DummyResolver;
let krate = lower_crate(&krate, &sess, &mut dummy_resolver);
let krate = lower_crate(&sess, &krate, &sess, &mut dummy_resolver);

let opts = scrape_test_config(&krate);

Expand Down

0 comments on commit 7734308

Please sign in to comment.