diff options
| author | Inokentiy Babushkin <twk@twki.de> | 2017-06-07 16:17:11 +0200 |
|---|---|---|
| committer | Inokentiy Babushkin <twk@twki.de> | 2017-06-07 16:31:05 +0200 |
| commit | 9a054f2002e5a21e6e0d14c89e20ec44049306fc (patch) | |
| tree | 6c2efec8a5277389e5470c82e938f00ab0b96186 /src/librustc | |
| parent | f73f675a864e966aedde79f8d2a8c821128e6b10 (diff) | |
| download | rust-9a054f2002e5a21e6e0d14c89e20ec44049306fc.tar.gz rust-9a054f2002e5a21e6e0d14c89e20ec44049306fc.zip | |
Fix translation of external spans.
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/middle/cstore.rs | 12 | ||||
| -rw-r--r-- | src/librustc/ty/item_path.rs | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/librustc/middle/cstore.rs b/src/librustc/middle/cstore.rs index 71b066c6688..6c902b8c5c6 100644 --- a/src/librustc/middle/cstore.rs +++ b/src/librustc/middle/cstore.rs @@ -232,7 +232,7 @@ pub trait CrateStore { // item info fn visibility(&self, def: DefId) -> ty::Visibility; - fn visible_parent_map<'a>(&'a self) -> ::std::cell::Ref<'a, DefIdMap<DefId>>; + fn visible_parent_map<'a>(&'a self, sess: &Session) -> ::std::cell::Ref<'a, DefIdMap<DefId>>; fn item_generics_cloned(&self, def: DefId) -> ty::Generics; // trait info @@ -285,7 +285,7 @@ pub trait CrateStore { fn def_path_hash(&self, def: DefId) -> hir_map::DefPathHash; fn def_path_table(&self, cnum: CrateNum) -> Rc<DefPathTable>; fn struct_field_names(&self, def: DefId) -> Vec<ast::Name>; - fn item_children(&self, did: DefId) -> Vec<def::Export>; + fn item_children(&self, did: DefId, sess: &Session) -> Vec<def::Export>; fn load_macro(&self, did: DefId, sess: &Session) -> LoadedMacro; // misc. metadata @@ -347,7 +347,9 @@ impl CrateStore for DummyCrateStore { { bug!("crate_data_as_rc_any") } // item info fn visibility(&self, def: DefId) -> ty::Visibility { bug!("visibility") } - fn visible_parent_map<'a>(&'a self) -> ::std::cell::Ref<'a, DefIdMap<DefId>> { + fn visible_parent_map<'a>(&'a self, session: &Session) + -> ::std::cell::Ref<'a, DefIdMap<DefId>> + { bug!("visible_parent_map") } fn item_generics_cloned(&self, def: DefId) -> ty::Generics @@ -421,7 +423,9 @@ impl CrateStore for DummyCrateStore { bug!("def_path_table") } fn struct_field_names(&self, def: DefId) -> Vec<ast::Name> { bug!("struct_field_names") } - fn item_children(&self, did: DefId) -> Vec<def::Export> { bug!("item_children") } + fn item_children(&self, did: DefId, sess: &Session) -> Vec<def::Export> { + bug!("item_children") + } fn load_macro(&self, did: DefId, sess: &Session) -> LoadedMacro { bug!("load_macro") } // misc. metadata diff --git a/src/librustc/ty/item_path.rs b/src/librustc/ty/item_path.rs index 78536b53ba8..9000aab8a6a 100644 --- a/src/librustc/ty/item_path.rs +++ b/src/librustc/ty/item_path.rs @@ -129,7 +129,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { pub fn try_push_visible_item_path<T>(self, buffer: &mut T, external_def_id: DefId) -> bool where T: ItemPathBuffer { - let visible_parent_map = self.sess.cstore.visible_parent_map(); + let visible_parent_map = self.sess.cstore.visible_parent_map(self.sess); let (mut cur_def, mut cur_path) = (external_def_id, Vec::<ast::Name>::new()); loop { |
