@@ -260,69 +260,6 @@ pub trait CrateStore {
260260
261261pub type CrateStoreDyn = dyn CrateStore + sync:: Sync ;
262262
263- /// A dummy crate store that does not support any non-local crates,
264- /// for test purposes.
265- pub struct DummyCrateStore ;
266-
267- #[ allow( unused_variables) ]
268- impl CrateStore for DummyCrateStore {
269- fn crate_data_as_rc_any ( & self , krate : CrateNum ) -> Lrc < dyn Any >
270- { bug ! ( "crate_data_as_rc_any" ) }
271- // item info
272- fn visibility_untracked ( & self , def : DefId ) -> ty:: Visibility { bug ! ( "visibility" ) }
273- fn item_generics_cloned_untracked ( & self , def : DefId , sess : & Session ) -> ty:: Generics
274- { bug ! ( "item_generics_cloned" ) }
275-
276- // trait/impl-item info
277- fn associated_item_cloned_untracked ( & self , def : DefId ) -> ty:: AssociatedItem
278- { bug ! ( "associated_item_cloned" ) }
279-
280- // crate metadata
281- fn dep_kind_untracked ( & self , cnum : CrateNum ) -> DepKind { bug ! ( "is_explicitly_linked" ) }
282- fn export_macros_untracked ( & self , cnum : CrateNum ) { bug ! ( "export_macros" ) }
283- fn crate_name_untracked ( & self , cnum : CrateNum ) -> Symbol { bug ! ( "crate_name" ) }
284- fn crate_disambiguator_untracked ( & self , cnum : CrateNum ) -> CrateDisambiguator {
285- bug ! ( "crate_disambiguator" )
286- }
287- fn crate_hash_untracked ( & self , cnum : CrateNum ) -> Svh { bug ! ( "crate_hash" ) }
288- fn crate_edition_untracked ( & self , cnum : CrateNum ) -> Edition { bug ! ( "crate_edition_untracked" ) }
289-
290- // resolve
291- fn def_key ( & self , def : DefId ) -> DefKey { bug ! ( "def_key" ) }
292- fn def_path ( & self , def : DefId ) -> hir_map:: DefPath {
293- bug ! ( "relative_def_path" )
294- }
295- fn def_path_hash ( & self , def : DefId ) -> hir_map:: DefPathHash {
296- bug ! ( "def_path_hash" )
297- }
298- fn def_path_table ( & self , cnum : CrateNum ) -> Lrc < DefPathTable > {
299- bug ! ( "def_path_table" )
300- }
301- fn struct_field_names_untracked ( & self , def : DefId ) -> Vec < ast:: Name > {
302- bug ! ( "struct_field_names" )
303- }
304- fn item_children_untracked ( & self , did : DefId , sess : & Session ) -> Vec < def:: Export > {
305- bug ! ( "item_children" )
306- }
307- fn load_macro_untracked ( & self , did : DefId , sess : & Session ) -> LoadedMacro { bug ! ( "load_macro" ) }
308-
309- fn crates_untracked ( & self ) -> Vec < CrateNum > { vec ! [ ] }
310-
311- // utility functions
312- fn extern_mod_stmt_cnum_untracked ( & self , emod_id : ast:: NodeId ) -> Option < CrateNum > { None }
313- fn encode_metadata < ' a , ' tcx > ( & self ,
314- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
315- link_meta : & LinkMeta )
316- -> EncodedMetadata {
317- bug ! ( "encode_metadata" )
318- }
319- fn metadata_encoding_version ( & self ) -> & [ u8 ] { bug ! ( "metadata_encoding_version" ) }
320- fn postorder_cnums_untracked ( & self ) -> Vec < CrateNum > { bug ! ( "postorder_cnums_untracked" ) }
321-
322- // access to the metadata loader
323- fn metadata_loader ( & self ) -> & dyn MetadataLoader { bug ! ( "metadata_loader" ) }
324- }
325-
326263pub trait CrateLoader {
327264 fn process_extern_crate ( & mut self , item : & ast:: Item , defs : & Definitions ) -> CrateNum ;
328265
0 commit comments