rustc: Parse, serialize, and deserialize trait inheritance
This commit is contained in:
parent
a805a1fb37
commit
b65dd9d090
13 changed files with 69 additions and 21 deletions
|
|
@ -231,7 +231,15 @@ fn map_item(i: @item, cx: ctx, v: vt) {
|
|||
// only need to handle methods
|
||||
do vec::iter(ms) |m| { map_method(d_id, p, m, cx); }
|
||||
}
|
||||
item_trait(tps, methods) {
|
||||
item_trait(tps, traits, methods) {
|
||||
// Map trait refs to their parent classes. This is
|
||||
// so we can find the self_ty
|
||||
for traits.each |p| {
|
||||
cx.map.insert(p.ref_id, node_item(i, item_path));
|
||||
// This is so we can look up the right things when
|
||||
// encoding/decoding
|
||||
cx.map.insert(p.impl_id, node_item(i, item_path));
|
||||
}
|
||||
for methods.each |tm| {
|
||||
let id = ast_util::trait_method_to_ty_method(tm).id;
|
||||
let d_id = ast_util::local_def(i.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue