Remove unused get_enum_variant_defs functions.
This commit is contained in:
parent
2c8d75d655
commit
53897baec8
@ -13,7 +13,6 @@
|
||||
use metadata::common::*;
|
||||
use metadata::cstore;
|
||||
use metadata::decoder;
|
||||
use middle::def;
|
||||
use middle::lang_items;
|
||||
use middle::ty;
|
||||
|
||||
@ -114,12 +113,6 @@ pub fn maybe_get_item_ast<'tcx>(tcx: &ty::ctxt<'tcx>, def: ast::DefId,
|
||||
decoder::maybe_get_item_ast(&*cdata, tcx, def.node, decode_inlined_item)
|
||||
}
|
||||
|
||||
pub fn get_enum_variant_defs(cstore: &cstore::CStore, enum_id: ast::DefId)
|
||||
-> Vec<(def::Def, ast::Name, ast::Visibility)> {
|
||||
let cdata = cstore.get_crate_data(enum_id.krate);
|
||||
decoder::get_enum_variant_defs(&*cstore.intr, &*cdata, enum_id.node)
|
||||
}
|
||||
|
||||
pub fn get_enum_variants<'tcx>(tcx: &ty::ctxt<'tcx>, def: ast::DefId)
|
||||
-> Vec<Rc<ty::VariantInfo<'tcx>>> {
|
||||
let cstore = &tcx.sess.cstore;
|
||||
|
@ -730,24 +730,6 @@ pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeI
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_enum_variant_defs(intr: &IdentInterner,
|
||||
cdata: Cmd,
|
||||
id: ast::NodeId)
|
||||
-> Vec<(def::Def, ast::Name, ast::Visibility)> {
|
||||
let data = cdata.data();
|
||||
let items = reader::get_doc(rbml::Doc::new(data), tag_items);
|
||||
let item = find_item(id, items);
|
||||
enum_variant_ids(item, cdata).map(|did| {
|
||||
let item = find_item(did.node, items);
|
||||
let name = item_name(intr, item);
|
||||
let visibility = item_visibility(item);
|
||||
match item_to_def_like(cdata, item, did) {
|
||||
DlDef(def @ def::DefVariant(..)) => (def, name, visibility),
|
||||
_ => unreachable!()
|
||||
}
|
||||
}).collect()
|
||||
}
|
||||
|
||||
pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId,
|
||||
tcx: &ty::ctxt<'tcx>) -> Vec<Rc<ty::VariantInfo<'tcx>>> {
|
||||
let data = cdata.data();
|
||||
|
Loading…
Reference in New Issue
Block a user