about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_map.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index 6c3fb82965d..9c9d19ba46b 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -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);
+                        }
+                    }
                 }
             }
             _ => {}