diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-04-19 20:05:50 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-04-19 21:01:11 -0700 |
| commit | 3d6c79109e869de58d6545f683b3e796237039fb (patch) | |
| tree | 339f570d9530df783143415f618af03f76648788 /src/librustsyntax | |
| parent | 3c995fb8f3676a313f5ac883e175cc5fe354e640 (diff) | |
update syntax to include a slash
Diffstat (limited to 'src/librustsyntax')
| -rw-r--r-- | src/librustsyntax/parse/parser.rs | 7 | ||||
| -rw-r--r-- | src/librustsyntax/print/pprust.rs | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs index 8b1fc2d6ada..d891275db5d 100644 --- a/src/librustsyntax/parse/parser.rs +++ b/src/librustsyntax/parse/parser.rs @@ -2249,7 +2249,12 @@ fn parse_item_type(p: parser, attrs: [ast::attribute]) -> @ast::item { } fn parse_region_param(p: parser) -> ast::region_param { - if eat(p, token::BINOP(token::AND)) {ast::rp_self} else {ast::rp_none} + if eat(p, token::BINOP(token::SLASH)) { + expect(p, token::BINOP(token::AND)); + ast::rp_self + } else { + ast::rp_none + } } fn parse_item_enum(p: parser, attrs: [ast::attribute]) -> @ast::item { diff --git a/src/librustsyntax/print/pprust.rs b/src/librustsyntax/print/pprust.rs index d5be2d12bc9..52673a548ec 100644 --- a/src/librustsyntax/print/pprust.rs +++ b/src/librustsyntax/print/pprust.rs @@ -1407,7 +1407,7 @@ fn print_bounds(s: ps, bounds: @[ast::ty_param_bound]) { fn print_region_param(s: ps, rp: ast::region_param) { alt rp { - ast::rp_self { word(s.s, "&") } + ast::rp_self { word(s.s, "/&") } ast::rp_none { } } } |
