about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-07-31 16:32:37 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-07-31 16:35:11 -0700
commit2cfe8fb357f8ad7e99dc03b09e0ec5fa1c2c9029 (patch)
tree56af8b2f6feb43d3393caf47bcebaa8399712257 /src/libsyntax
parent567f881fdf4053d4890929eb4cd46c67c4a011ee (diff)
downloadrust-2cfe8fb357f8ad7e99dc03b09e0ec5fa1c2c9029.tar.gz
rust-2cfe8fb357f8ad7e99dc03b09e0ec5fa1c2c9029.zip
rustc: Check self types in method lookup; allow required trait methods to have self types; write self types into metadata
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs3
-rw-r--r--src/libsyntax/parse/parser.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 8210f0734ac..6e56e5ca65a 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -503,7 +503,8 @@ type ty_field = spanned<ty_field_>;
 
 #[auto_serialize]
 type ty_method = {ident: ident, attrs: ~[attribute],
-                  decl: fn_decl, tps: ~[ty_param], span: span};
+                  decl: fn_decl, tps: ~[ty_param], self_ty: self_ty,
+                  span: span};
 
 #[auto_serialize]
 // A trait method is either required (meaning it doesn't have an
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 80cfd50ea3b..46a9f062645 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -286,6 +286,7 @@ class parser {
                 // methods are ignored; this could change.
                 required({ident: ident, attrs: attrs,
                           decl: {purity: pur with d}, tps: tps,
+                          self_ty: self_ty,
                           span: mk_sp(lo, hi)})
               }
               token::LBRACE {