about summary refs log tree commit diff
path: root/src/librustsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-05-24 10:23:46 -0700
committerEric Holk <eric.holk@gmail.com>2012-05-24 15:06:56 -0700
commitd993df74c39d7c0938194485d7c41ba94ed419ec (patch)
treeeb87842e74ba8db2a456c5d3a2fd7767c3559567 /src/librustsyntax/parse/parser.rs
parent30f8555544481e998f52d196c5a0f4d04cbcf334 (diff)
downloadrust-d993df74c39d7c0938194485d7c41ba94ed419ec.tar.gz
rust-d993df74c39d7c0938194485d7c41ba94ed419ec.zip
Teach parser and related things to understand const kind bounds.
Diffstat (limited to 'src/librustsyntax/parse/parser.rs')
-rw-r--r--src/librustsyntax/parse/parser.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs
index 4f502d037cb..3814a7ada00 100644
--- a/src/librustsyntax/parse/parser.rs
+++ b/src/librustsyntax/parse/parser.rs
@@ -1676,8 +1676,11 @@ class parser {
         let ident = self.parse_ident();
         if self.eat(token::COLON) {
             while self.token != token::COMMA && self.token != token::GT {
-                if self.eat_keyword("send") { bounds += [bound_send]; }
-                else if self.eat_keyword("copy") { bounds += [bound_copy]; }
+                if self.eat_keyword(self, "send") { bounds += [bound_send]; }
+                else if self.eat_keyword(self, "copy")
+                    { bounds += [bound_copy]; }
+                else if self.eat_keyword(self, "const")
+                    { bounds += [bound_const]; }
                 else { bounds += [bound_iface(self.parse_ty(false))]; }
             }
         }