Skip to content

Commit

Permalink
Add self to the ast_map for provided methods. Closes #8010.
Browse files Browse the repository at this point in the history
  • Loading branch information
msullivan committed Aug 22, 2013
1 parent 48a6823 commit 451de33
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/libsyntax/ast_map.rs
Expand Up @@ -238,12 +238,18 @@ impl Visitor<()> for Ctx {
self.map.insert(p.ref_id, node_item(i, item_path));
}
for tm in methods.iter() {
let id = ast_util::trait_method_to_ty_method(tm).id;
let ext = { self.extend(i.ident) };
let d_id = ast_util::local_def(i.id);
self.map.insert(id,
node_trait_method(@(*tm).clone(),
d_id,
item_path));
match *tm {
required(ref m) => {
let entry =
node_trait_method(@(*tm).clone(), d_id, ext);
self.map.insert(m.id, entry);
}
provided(m) => {
self.map_method(d_id, ext, m, true);
}
}
}
}
_ => {}
Expand Down

0 comments on commit 451de33

Please sign in to comment.