Skip to content

Commit

Permalink
Removed some cruft added for macro expansion serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibabushkin committed Oct 7, 2017
1 parent 3927f51 commit 909808f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/librustc/middle/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ pub struct ExternBodyNestedBodies {
pub trait CrateStore {
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Rc<Any>;

fn ensure_hygiene_data_loaded(&self);

// access to the metadata loader
fn metadata_loader(&self) -> &MetadataLoader;

Expand Down Expand Up @@ -327,7 +325,6 @@ pub struct DummyCrateStore;
impl CrateStore for DummyCrateStore {
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Rc<Any>
{ bug!("crate_data_as_rc_any") }
fn ensure_hygiene_data_loaded(&self) { bug!("ensure_hygiene_data_loaded") }
// item info
fn visibility_untracked(&self, def: DefId) -> ty::Visibility { bug!("visibility") }
fn item_generics_cloned_untracked(&self, def: DefId) -> ty::Generics
Expand Down
6 changes: 0 additions & 6 deletions src/librustc_metadata/cstore_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,6 @@ impl CrateStore for cstore::CStore {
self.get_crate_data(krate)
}

fn ensure_hygiene_data_loaded(&self) {
self.iter_crate_data(|_, metadata| {
(*metadata).imported_hygiene_data();
});
}

fn metadata_loader(&self) -> &MetadataLoader {
&*self.metadata_loader
}
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
}

fn encode_hygiene_data(&mut self) -> Lazy<hygiene::HygieneDataMap> {
// FIXME(twk): remove the `ensure_hygiene_data_loaded` method
// self.tcx.sess.cstore.ensure_hygiene_data_loaded();
let data = hygiene::HygieneData::safe_with(|data| data.to_map());
self.lazy(&data)
}
Expand Down

0 comments on commit 909808f

Please sign in to comment.