about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
-rw-r--r--src/comp/syntax/parse/parser.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 602e209e573..eca22f38adf 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1831,9 +1831,10 @@ fn parse_method(p: parser) -> @ast::method {
 
 fn parse_item_iface(p: parser, attrs: [ast::attribute]) -> @ast::item {
     let lo = p.last_span.lo, ident = parse_ident(p),
-        tps = parse_ty_params(p), meths = parse_ty_methods(p);
+        tps = parse_ty_params(p), meths = parse_ty_methods(p),
+        self_tp = {ident: "self", id: p.get_id(), bounds: @[]};
     ret mk_item(p, lo, p.last_span.hi, ident,
-                ast::item_iface(tps, meths), attrs);
+                ast::item_iface(tps + [self_tp], meths), attrs);
 }
 
 // Parses three variants (with the initial params always optional):