diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-05-24 10:23:46 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-05-24 15:06:56 -0700 |
| commit | d993df74c39d7c0938194485d7c41ba94ed419ec (patch) | |
| tree | eb87842e74ba8db2a456c5d3a2fd7767c3559567 /src/librustsyntax/parse/parser.rs | |
| parent | 30f8555544481e998f52d196c5a0f4d04cbcf334 (diff) | |
| download | rust-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.rs | 7 |
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))]; } } } |
