Skip to content

Commit

Permalink
when encoding, push MetaData(foo) task on stack
Browse files Browse the repository at this point in the history
This lets us determine what was used to construct the metadata.

Conflicts:
	src/librustc_metadata/encoder.rs
  • Loading branch information
nikomatsakis committed May 18, 2016
1 parent 5bcdf4c commit ef902a2
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 54 deletions.
1 change: 1 addition & 0 deletions src/librustc/dep_graph/mod.rs
Expand Up @@ -22,3 +22,4 @@ pub use self::dep_node::DepNode;
pub use self::graph::DepGraph;
pub use self::query::DepGraphQuery;
pub use self::visit::visit_all_items_in_krate;
pub use self::raii::DepTask;
2 changes: 1 addition & 1 deletion src/librustc_metadata/csearch.rs
Expand Up @@ -64,7 +64,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
decoder::closure_kind(&cdata, def_id.index)
}

fn closure_ty(&self, tcx: &TyCtxt<'tcx>, def_id: DefId) -> ty::ClosureTy<'tcx> {
fn closure_ty<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> ty::ClosureTy<'tcx> {
assert!(!def_id.is_local());
self.dep_graph.read(DepNode::MetaData(def_id));
let cdata = self.get_crate_data(def_id.krate);
Expand Down

0 comments on commit ef902a2

Please sign in to comment.