mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 14:57:14 +00:00
Remove commented-out code and old comments that accidentally snuck in
This commit is contained in:
parent
3d4ef74c9b
commit
931514cfb6
@ -85,8 +85,7 @@ const tag_item_field: uint = 0x44u;
|
||||
const tag_class_mut: uint = 0x45u;
|
||||
|
||||
const tag_region_param: uint = 0x46u;
|
||||
const tag_mod_impl_use: uint = 0x47u;
|
||||
const tag_mod_impl_iface: uint = 0x48u;
|
||||
const tag_mod_impl_iface: uint = 0x47u;
|
||||
/*
|
||||
iface items contain tag_item_iface_method elements,
|
||||
impl items contain tag_item_impl_method elements, and classes
|
||||
@ -95,7 +94,7 @@ const tag_mod_impl_iface: uint = 0x48u;
|
||||
both, tag_item_iface_method and tag_item_impl_method have to be two
|
||||
different tags.
|
||||
*/
|
||||
const tag_item_impl_method: uint = 0x49u;
|
||||
const tag_item_impl_method: uint = 0x48u;
|
||||
|
||||
// used to encode crate_ctxt side tables
|
||||
enum astencode_tag { // Reserves 0x50 -- 0x6f
|
||||
|
@ -417,24 +417,8 @@ fn get_impls_for_mod(cdata: cmd, m_id: ast::node_id,
|
||||
let mod_item = lookup_item(m_id, data);
|
||||
let mut result = [];
|
||||
ebml::tagged_docs(mod_item, tag_mod_impl) {|doc|
|
||||
/*
|
||||
Pair of an item did and an iface did.
|
||||
The second one is unneeded if the first id names
|
||||
an impl; disambiguates if it's a class
|
||||
*/
|
||||
let did = parse_def_id(ebml::doc_data(ebml::get_doc(doc,
|
||||
tag_mod_impl_use)));
|
||||
let did = parse_def_id(ebml::doc_data(doc));
|
||||
let local_did = translate_def_id(cdata, did);
|
||||
/*
|
||||
// iface is optional
|
||||
let iface_did = option::map(ebml::maybe_get_doc(doc,
|
||||
tag_mod_impl_iface)) {|d|
|
||||
parse_def_id(ebml::doc_data(d))};
|
||||
option::iter(iface_did) {|x|
|
||||
let _local_iface_did = translate_def_id(cdata, x);
|
||||
};
|
||||
*/
|
||||
// CONFUSED -- previous code is pointless
|
||||
// The impl may be defined in a different crate. Ask the caller
|
||||
// to give us the metadata
|
||||
let impl_cdata = get_cdata(local_did.crate);
|
||||
@ -444,8 +428,6 @@ fn get_impls_for_mod(cdata: cmd, m_id: ast::node_id,
|
||||
if alt name { some(n) { n == nm } none { true } } {
|
||||
let base_tps = item_ty_param_count(item);
|
||||
result += [@{
|
||||
// here, we need to... reconstruct the iface_ref?
|
||||
// probz broken
|
||||
did: local_did, ident: nm,
|
||||
methods: item_impl_methods(impl_cdata, item, base_tps)
|
||||
}];
|
||||
|
@ -372,8 +372,7 @@ fn encode_info_for_mod(ecx: @encode_ctxt, ebml_w: ebml::writer, md: _mod,
|
||||
ebml_w.start_tag(tag_mod_impl);
|
||||
/* If did stands for an iface
|
||||
ref, we need to map it to its parent class */
|
||||
ebml_w.start_tag(tag_mod_impl_use);
|
||||
let iface_ty = alt ecx.ccx.tcx.items.get(i.did.node) {
|
||||
alt ecx.ccx.tcx.items.get(i.did.node) {
|
||||
ast_map::node_item(it@@{node: cl@item_class(*),_},_) {
|
||||
ebml_w.wr_str(def_to_str(local_def(it.id)));
|
||||
some(ty::lookup_item_type(ecx.ccx.tcx, i.did).ty)
|
||||
@ -388,26 +387,6 @@ fn encode_info_for_mod(ecx: @encode_ctxt, ebml_w: ebml::writer, md: _mod,
|
||||
}
|
||||
};
|
||||
ebml_w.end_tag();
|
||||
|
||||
/*
|
||||
/* Write the iface did if it exists */
|
||||
option::iter(iface_ty) {|i|
|
||||
alt ty::get(i).struct {
|
||||
ty::ty_iface(did, tys) {
|
||||
// FIXME: tys?
|
||||
ebml_w.start_tag(tag_mod_impl_iface);
|
||||
ebml_w.wr_str(def_to_str(did));
|
||||
ebml_w.end_tag();
|
||||
|
||||
}
|
||||
t {
|
||||
ecx.ccx.tcx.sess.bug(#fmt("Expected item to implement \
|
||||
an iface, but found %s",
|
||||
util::ppaux::ty_to_str(ecx.ccx.tcx, i)));
|
||||
}
|
||||
}}
|
||||
*/
|
||||
ebml_w.end_tag();
|
||||
} // if
|
||||
} // for
|
||||
} // list::cons alt
|
||||
|
Loading…
Reference in New Issue
Block a user