Skip to content

Commit 2da9199

Browse files
committed
---
yaml --- r: 15705 b: refs/heads/try c: 931514c h: refs/heads/master i: 15703: 1afb025 v: v3
1 parent 66f20ef commit 2da9199

File tree

4 files changed

+5
-45
lines changed

4 files changed

+5
-45
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 3d4ef74c9bdd2179199c02d7cbe58266c849b057
5+
refs/heads/try: 931514cfb67d9e84c587bdeee82602d499c3b435
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/metadata/common.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ const tag_item_field: uint = 0x44u;
8585
const tag_class_mut: uint = 0x45u;
8686

8787
const tag_region_param: uint = 0x46u;
88-
const tag_mod_impl_use: uint = 0x47u;
89-
const tag_mod_impl_iface: uint = 0x48u;
88+
const tag_mod_impl_iface: uint = 0x47u;
9089
/*
9190
iface items contain tag_item_iface_method elements,
9291
impl items contain tag_item_impl_method elements, and classes
@@ -95,7 +94,7 @@ const tag_mod_impl_iface: uint = 0x48u;
9594
both, tag_item_iface_method and tag_item_impl_method have to be two
9695
different tags.
9796
*/
98-
const tag_item_impl_method: uint = 0x49u;
97+
const tag_item_impl_method: uint = 0x48u;
9998

10099
// used to encode crate_ctxt side tables
101100
enum astencode_tag { // Reserves 0x50 -- 0x6f

branches/try/src/rustc/metadata/decoder.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -417,24 +417,8 @@ fn get_impls_for_mod(cdata: cmd, m_id: ast::node_id,
417417
let mod_item = lookup_item(m_id, data);
418418
let mut result = [];
419419
ebml::tagged_docs(mod_item, tag_mod_impl) {|doc|
420-
/*
421-
Pair of an item did and an iface did.
422-
The second one is unneeded if the first id names
423-
an impl; disambiguates if it's a class
424-
*/
425-
let did = parse_def_id(ebml::doc_data(ebml::get_doc(doc,
426-
tag_mod_impl_use)));
420+
let did = parse_def_id(ebml::doc_data(doc));
427421
let local_did = translate_def_id(cdata, did);
428-
/*
429-
// iface is optional
430-
let iface_did = option::map(ebml::maybe_get_doc(doc,
431-
tag_mod_impl_iface)) {|d|
432-
parse_def_id(ebml::doc_data(d))};
433-
option::iter(iface_did) {|x|
434-
let _local_iface_did = translate_def_id(cdata, x);
435-
};
436-
*/
437-
// CONFUSED -- previous code is pointless
438422
// The impl may be defined in a different crate. Ask the caller
439423
// to give us the metadata
440424
let impl_cdata = get_cdata(local_did.crate);
@@ -444,8 +428,6 @@ fn get_impls_for_mod(cdata: cmd, m_id: ast::node_id,
444428
if alt name { some(n) { n == nm } none { true } } {
445429
let base_tps = item_ty_param_count(item);
446430
result += [@{
447-
// here, we need to... reconstruct the iface_ref?
448-
// probz broken
449431
did: local_did, ident: nm,
450432
methods: item_impl_methods(impl_cdata, item, base_tps)
451433
}];

branches/try/src/rustc/metadata/encoder.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ fn encode_info_for_mod(ecx: @encode_ctxt, ebml_w: ebml::writer, md: _mod,
372372
ebml_w.start_tag(tag_mod_impl);
373373
/* If did stands for an iface
374374
ref, we need to map it to its parent class */
375-
ebml_w.start_tag(tag_mod_impl_use);
376-
let iface_ty = alt ecx.ccx.tcx.items.get(i.did.node) {
375+
alt ecx.ccx.tcx.items.get(i.did.node) {
377376
ast_map::node_item(it@@{node: cl@item_class(*),_},_) {
378377
ebml_w.wr_str(def_to_str(local_def(it.id)));
379378
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,
388387
}
389388
};
390389
ebml_w.end_tag();
391-
392-
/*
393-
/* Write the iface did if it exists */
394-
option::iter(iface_ty) {|i|
395-
alt ty::get(i).struct {
396-
ty::ty_iface(did, tys) {
397-
// FIXME: tys?
398-
ebml_w.start_tag(tag_mod_impl_iface);
399-
ebml_w.wr_str(def_to_str(did));
400-
ebml_w.end_tag();
401-
402-
}
403-
t {
404-
ecx.ccx.tcx.sess.bug(#fmt("Expected item to implement \
405-
an iface, but found %s",
406-
util::ppaux::ty_to_str(ecx.ccx.tcx, i)));
407-
}
408-
}}
409-
*/
410-
ebml_w.end_tag();
411390
} // if
412391
} // for
413392
} // list::cons alt

0 commit comments

Comments
 (0)