Skip to content

Commit e7ec5a9

Browse files
committed
---
yaml --- r: 273839 b: refs/heads/beta c: 2fa867a h: refs/heads/master i: 273837: 2c1c8b4 273835: 7379f31 273831: f3741a9 273823: 099f943
1 parent 55f1b0e commit e7ec5a9

File tree

3 files changed

+72
-70
lines changed

3 files changed

+72
-70
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: dfd0e937acb4d07fbdc6d95d5d8d6e852f7ef734
26+
refs/heads/beta: 2fa867a2031bd580cd763fa9dcd8d7d4ba9e2bfc
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc/middle/cstore.rs

Lines changed: 70 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -336,121 +336,123 @@ pub struct DummyCrateStore;
336336
#[allow(unused_variables)]
337337
impl<'tcx> CrateStore<'tcx> for DummyCrateStore {
338338
// item info
339-
fn stability(&self, def: DefId) -> Option<attr::Stability> { unimplemented!() }
340-
fn deprecation(&self, def: DefId) -> Option<attr::Deprecation> { unimplemented!() }
341-
fn visibility(&self, def: DefId) -> hir::Visibility { unimplemented!() }
339+
fn stability(&self, def: DefId) -> Option<attr::Stability> { bug!("stability") }
340+
fn deprecation(&self, def: DefId) -> Option<attr::Deprecation> { bug!("deprecation") }
341+
fn visibility(&self, def: DefId) -> hir::Visibility { bug!("visibility") }
342342
fn closure_kind(&self, tcx: &TyCtxt<'tcx>, def_id: DefId)
343-
-> ty::ClosureKind { unimplemented!() }
343+
-> ty::ClosureKind { bug!("closure_kind") }
344344
fn closure_ty(&self, tcx: &TyCtxt<'tcx>, def_id: DefId)
345-
-> ty::ClosureTy<'tcx> { unimplemented!() }
346-
fn item_variances(&self, def: DefId) -> ty::ItemVariances { unimplemented!() }
347-
fn repr_attrs(&self, def: DefId) -> Vec<attr::ReprAttr> { unimplemented!() }
345+
-> ty::ClosureTy<'tcx> { bug!("closure_ty") }
346+
fn item_variances(&self, def: DefId) -> ty::ItemVariances { bug!("item_variances") }
347+
fn repr_attrs(&self, def: DefId) -> Vec<attr::ReprAttr> { bug!("repr_attrs") }
348348
fn item_type(&self, tcx: &TyCtxt<'tcx>, def: DefId)
349-
-> ty::TypeScheme<'tcx> { unimplemented!() }
350-
fn relative_item_path(&self, def: DefId) -> Vec<hir_map::PathElem> { unimplemented!() }
349+
-> ty::TypeScheme<'tcx> { bug!("item_type") }
350+
fn relative_item_path(&self, def: DefId)
351+
-> Vec<hir_map::PathElem> { bug!("relative_item_path") }
351352
fn visible_parent_map<'a>(&'a self) -> ::std::cell::RefMut<'a, DefIdMap<DefId>> {
352-
unimplemented!()
353+
bug!("visible_parent_map")
353354
}
354-
fn extern_item_path(&self, def: DefId) -> Vec<hir_map::PathElem> { unimplemented!() }
355-
fn item_name(&self, def: DefId) -> ast::Name { unimplemented!() }
355+
fn extern_item_path(&self, def: DefId) -> Vec<hir_map::PathElem> { bug!("extern_item_path") }
356+
fn item_name(&self, def: DefId) -> ast::Name { bug!("item_name") }
356357
fn item_predicates(&self, tcx: &TyCtxt<'tcx>, def: DefId)
357-
-> ty::GenericPredicates<'tcx> { unimplemented!() }
358+
-> ty::GenericPredicates<'tcx> { bug!("item_predicates") }
358359
fn item_super_predicates(&self, tcx: &TyCtxt<'tcx>, def: DefId)
359-
-> ty::GenericPredicates<'tcx> { unimplemented!() }
360-
fn item_attrs(&self, def_id: DefId) -> Vec<ast::Attribute> { unimplemented!() }
361-
fn item_symbol(&self, def: DefId) -> String { unimplemented!() }
360+
-> ty::GenericPredicates<'tcx> { bug!("item_super_predicates") }
361+
fn item_attrs(&self, def_id: DefId) -> Vec<ast::Attribute> { bug!("item_attrs") }
362+
fn item_symbol(&self, def: DefId) -> String { bug!("item_symbol") }
362363
fn trait_def(&self, tcx: &TyCtxt<'tcx>, def: DefId)-> ty::TraitDef<'tcx>
363-
{ unimplemented!() }
364+
{ bug!("trait_def") }
364365
fn adt_def(&self, tcx: &TyCtxt<'tcx>, def: DefId) -> ty::AdtDefMaster<'tcx>
365-
{ unimplemented!() }
366-
fn method_arg_names(&self, did: DefId) -> Vec<String> { unimplemented!() }
366+
{ bug!("adt_def") }
367+
fn method_arg_names(&self, did: DefId) -> Vec<String> { bug!("method_arg_names") }
367368
fn inherent_implementations_for_type(&self, def_id: DefId) -> Vec<DefId> { vec![] }
368369

369370
// trait info
370371
fn implementations_of_trait(&self, def_id: DefId) -> Vec<DefId> { vec![] }
371372
fn provided_trait_methods(&self, tcx: &TyCtxt<'tcx>, def: DefId)
372-
-> Vec<Rc<ty::Method<'tcx>>> { unimplemented!() }
373+
-> Vec<Rc<ty::Method<'tcx>>> { bug!("provided_trait_methods") }
373374
fn trait_item_def_ids(&self, def: DefId)
374-
-> Vec<ty::ImplOrTraitItemId> { unimplemented!() }
375+
-> Vec<ty::ImplOrTraitItemId> { bug!("trait_item_def_ids") }
375376

376377
// impl info
377378
fn impl_items(&self, impl_def_id: DefId) -> Vec<ty::ImplOrTraitItemId>
378-
{ unimplemented!() }
379+
{ bug!("impl_items") }
379380
fn impl_trait_ref(&self, tcx: &TyCtxt<'tcx>, def: DefId)
380-
-> Option<ty::TraitRef<'tcx>> { unimplemented!() }
381-
fn impl_polarity(&self, def: DefId) -> Option<hir::ImplPolarity> { unimplemented!() }
381+
-> Option<ty::TraitRef<'tcx>> { bug!("impl_trait_ref") }
382+
fn impl_polarity(&self, def: DefId) -> Option<hir::ImplPolarity> { bug!("impl_polarity") }
382383
fn custom_coerce_unsized_kind(&self, def: DefId)
383384
-> Option<ty::adjustment::CustomCoerceUnsized>
384-
{ unimplemented!() }
385+
{ bug!("custom_coerce_unsized_kind") }
385386
fn associated_consts(&self, tcx: &TyCtxt<'tcx>, def: DefId)
386-
-> Vec<Rc<ty::AssociatedConst<'tcx>>> { unimplemented!() }
387-
fn impl_parent(&self, def: DefId) -> Option<DefId> { unimplemented!() }
387+
-> Vec<Rc<ty::AssociatedConst<'tcx>>> { bug!("associated_consts") }
388+
fn impl_parent(&self, def: DefId) -> Option<DefId> { bug!("impl_parent") }
388389

389390
// trait/impl-item info
390391
fn trait_of_item(&self, tcx: &TyCtxt<'tcx>, def_id: DefId)
391-
-> Option<DefId> { unimplemented!() }
392+
-> Option<DefId> { bug!("trait_of_item") }
392393
fn impl_or_trait_item(&self, tcx: &TyCtxt<'tcx>, def: DefId)
393-
-> Option<ty::ImplOrTraitItem<'tcx>> { unimplemented!() }
394+
-> Option<ty::ImplOrTraitItem<'tcx>> { bug!("impl_or_trait_item") }
394395

395396
// flags
396-
fn is_const_fn(&self, did: DefId) -> bool { unimplemented!() }
397-
fn is_defaulted_trait(&self, did: DefId) -> bool { unimplemented!() }
398-
fn is_impl(&self, did: DefId) -> bool { unimplemented!() }
399-
fn is_default_impl(&self, impl_did: DefId) -> bool { unimplemented!() }
400-
fn is_extern_item(&self, tcx: &TyCtxt<'tcx>, did: DefId) -> bool { unimplemented!() }
401-
fn is_static_method(&self, did: DefId) -> bool { unimplemented!() }
397+
fn is_const_fn(&self, did: DefId) -> bool { bug!("is_const_fn") }
398+
fn is_defaulted_trait(&self, did: DefId) -> bool { bug!("is_defaulted_trait") }
399+
fn is_impl(&self, did: DefId) -> bool { bug!("is_impl") }
400+
fn is_default_impl(&self, impl_did: DefId) -> bool { bug!("is_default_impl") }
401+
fn is_extern_item(&self, tcx: &TyCtxt<'tcx>, did: DefId) -> bool { bug!("is_extern_item") }
402+
fn is_static_method(&self, did: DefId) -> bool { bug!("is_static_method") }
402403
fn is_statically_included_foreign_item(&self, id: ast::NodeId) -> bool { false }
403-
fn is_typedef(&self, did: DefId) -> bool { unimplemented!() }
404+
fn is_typedef(&self, did: DefId) -> bool { bug!("is_typedef") }
404405

405406
// crate metadata
406407
fn dylib_dependency_formats(&self, cnum: ast::CrateNum)
407408
-> Vec<(ast::CrateNum, LinkagePreference)>
408-
{ unimplemented!() }
409+
{ bug!("dylib_dependency_formats") }
409410
fn lang_items(&self, cnum: ast::CrateNum) -> Vec<(DefIndex, usize)>
410-
{ unimplemented!() }
411+
{ bug!("lang_items") }
411412
fn missing_lang_items(&self, cnum: ast::CrateNum) -> Vec<lang_items::LangItem>
412-
{ unimplemented!() }
413-
fn is_staged_api(&self, cnum: ast::CrateNum) -> bool { unimplemented!() }
414-
fn is_explicitly_linked(&self, cnum: ast::CrateNum) -> bool { unimplemented!() }
415-
fn is_allocator(&self, cnum: ast::CrateNum) -> bool { unimplemented!() }
416-
fn extern_crate(&self, cnum: ast::CrateNum) -> Option<ExternCrate> { unimplemented!() }
413+
{ bug!("missing_lang_items") }
414+
fn is_staged_api(&self, cnum: ast::CrateNum) -> bool { bug!("is_staged_api") }
415+
fn is_explicitly_linked(&self, cnum: ast::CrateNum) -> bool { bug!("is_explicitly_linked") }
416+
fn is_allocator(&self, cnum: ast::CrateNum) -> bool { bug!("is_allocator") }
417+
fn extern_crate(&self, cnum: ast::CrateNum) -> Option<ExternCrate> { bug!("extern_crate") }
417418
fn crate_attrs(&self, cnum: ast::CrateNum) -> Vec<ast::Attribute>
418-
{ unimplemented!() }
419-
fn crate_name(&self, cnum: ast::CrateNum) -> InternedString { unimplemented!() }
419+
{ bug!("crate_attrs") }
420+
fn crate_name(&self, cnum: ast::CrateNum) -> InternedString { bug!("crate_name") }
420421
fn original_crate_name(&self, cnum: ast::CrateNum) -> InternedString {
421-
unimplemented!()
422+
bug!("original_crate_name")
422423
}
423-
fn crate_hash(&self, cnum: ast::CrateNum) -> Svh { unimplemented!() }
424-
fn crate_disambiguator(&self, cnum: ast::CrateNum) -> InternedString { unimplemented!() }
424+
fn crate_hash(&self, cnum: ast::CrateNum) -> Svh { bug!("crate_hash") }
425+
fn crate_disambiguator(&self, cnum: ast::CrateNum)
426+
-> InternedString { bug!("crate_disambiguator") }
425427
fn crate_struct_field_attrs(&self, cnum: ast::CrateNum)
426428
-> FnvHashMap<DefId, Vec<ast::Attribute>>
427-
{ unimplemented!() }
429+
{ bug!("crate_struct_field_attrs") }
428430
fn plugin_registrar_fn(&self, cnum: ast::CrateNum) -> Option<DefId>
429-
{ unimplemented!() }
431+
{ bug!("plugin_registrar_fn") }
430432
fn native_libraries(&self, cnum: ast::CrateNum) -> Vec<(NativeLibraryKind, String)>
431-
{ unimplemented!() }
432-
fn reachable_ids(&self, cnum: ast::CrateNum) -> Vec<DefId> { unimplemented!() }
433+
{ bug!("native_libraries") }
434+
fn reachable_ids(&self, cnum: ast::CrateNum) -> Vec<DefId> { bug!("reachable_ids") }
433435

434436
// resolve
435-
fn def_key(&self, def: DefId) -> hir_map::DefKey { unimplemented!() }
436-
fn relative_def_path(&self, def: DefId) -> hir_map::DefPath { unimplemented!() }
437-
fn variant_kind(&self, def_id: DefId) -> Option<VariantKind> { unimplemented!() }
437+
fn def_key(&self, def: DefId) -> hir_map::DefKey { bug!("def_key") }
438+
fn relative_def_path(&self, def: DefId) -> hir_map::DefPath { bug!("relative_def_path") }
439+
fn variant_kind(&self, def_id: DefId) -> Option<VariantKind> { bug!("variant_kind") }
438440
fn struct_ctor_def_id(&self, struct_def_id: DefId) -> Option<DefId>
439-
{ unimplemented!() }
441+
{ bug!("struct_ctor_def_id") }
440442
fn tuple_struct_definition_if_ctor(&self, did: DefId) -> Option<DefId>
441-
{ unimplemented!() }
442-
fn struct_field_names(&self, def: DefId) -> Vec<ast::Name> { unimplemented!() }
443-
fn item_children(&self, did: DefId) -> Vec<ChildItem> { unimplemented!() }
443+
{ bug!("tuple_struct_definition_if_ctor") }
444+
fn struct_field_names(&self, def: DefId) -> Vec<ast::Name> { bug!("struct_field_names") }
445+
fn item_children(&self, did: DefId) -> Vec<ChildItem> { bug!("item_children") }
444446
fn crate_top_level_items(&self, cnum: ast::CrateNum) -> Vec<ChildItem>
445-
{ unimplemented!() }
447+
{ bug!("crate_top_level_items") }
446448

447449
// misc. metadata
448450
fn maybe_get_item_ast(&'tcx self, tcx: &TyCtxt<'tcx>, def: DefId)
449-
-> FoundAst<'tcx> { unimplemented!() }
451+
-> FoundAst<'tcx> { bug!("maybe_get_item_ast") }
450452
fn maybe_get_item_mir(&self, tcx: &TyCtxt<'tcx>, def: DefId)
451-
-> Option<Mir<'tcx>> { unimplemented!() }
453+
-> Option<Mir<'tcx>> { bug!("maybe_get_item_mir") }
452454
fn is_item_mir_available(&self, def: DefId) -> bool {
453-
unimplemented!()
455+
bug!("is_item_mir_available")
454456
}
455457

456458
// This is basically a 1-based range of ints, which is a little
@@ -460,18 +462,18 @@ impl<'tcx> CrateStore<'tcx> for DummyCrateStore {
460462
fn used_link_args(&self) -> Vec<String> { vec![] }
461463

462464
// utility functions
463-
fn metadata_filename(&self) -> &str { unimplemented!() }
464-
fn metadata_section_name(&self, target: &Target) -> &str { unimplemented!() }
465+
fn metadata_filename(&self) -> &str { bug!("metadata_filename") }
466+
fn metadata_section_name(&self, target: &Target) -> &str { bug!("metadata_section_name") }
465467
fn encode_type(&self,
466468
tcx: &TyCtxt<'tcx>,
467469
ty: Ty<'tcx>,
468470
def_id_to_string: fn(&TyCtxt<'tcx>, DefId) -> String)
469471
-> Vec<u8> {
470-
unimplemented!()
472+
bug!("encode_type")
471473
}
472474
fn used_crates(&self, prefer: LinkagePreference) -> Vec<(ast::CrateNum, Option<PathBuf>)>
473475
{ vec![] }
474-
fn used_crate_source(&self, cnum: ast::CrateNum) -> CrateSource { unimplemented!() }
476+
fn used_crate_source(&self, cnum: ast::CrateNum) -> CrateSource { bug!("used_crate_source") }
475477
fn extern_mod_stmt_cnum(&self, emod_id: ast::NodeId) -> Option<ast::CrateNum> { None }
476478
fn encode_metadata(&self,
477479
tcx: &TyCtxt<'tcx>,
@@ -481,7 +483,7 @@ impl<'tcx> CrateStore<'tcx> for DummyCrateStore {
481483
reachable: &NodeSet,
482484
mir_map: &MirMap<'tcx>,
483485
krate: &hir::Crate) -> Vec<u8> { vec![] }
484-
fn metadata_encoding_version(&self) -> &[u8] { unimplemented!() }
486+
fn metadata_encoding_version(&self) -> &[u8] { bug!("metadata_encoding_version") }
485487
}
486488

487489

branches/beta/src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ fn early_bound_lifetime_names(generics: &hir::Generics) -> Vec<ast::Name> {
822822
collector.visit_lifetime(bound);
823823
}
824824
}
825-
&hir::WherePredicate::EqPredicate(_) => unimplemented!()
825+
&hir::WherePredicate::EqPredicate(_) => bug!("unimplemented")
826826
}
827827
}
828828
}

0 commit comments

Comments
 (0)