diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-20 16:07:09 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-20 17:51:17 -0700 |
| commit | 865dcb663da2d0534d508346cbe1df5dc66f3ad6 (patch) | |
| tree | 8e4af2aee695b380631be9887ac36f00aacbf864 /src/comp/syntax/parse | |
| parent | be1feaa9187ca75c867b04283c2bea1128c344d5 (diff) | |
| download | rust-865dcb663da2d0534d508346cbe1df5dc66f3ad6.tar.gz rust-865dcb663da2d0534d508346cbe1df5dc66f3ad6.zip | |
Parse unique box types
Issue #409
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 1d84ed148b1..3e559e1a2a9 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -540,6 +540,11 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty { let mt = parse_mt(p); hi = mt.ty.span.hi; t = ast::ty_box(mt); + } else if p.peek() == token::TILDE { + p.bump(); + let mt = parse_mt(p); + hi = mt.ty.span.hi; + t = ast::ty_uniq(mt); } else if p.peek() == token::BINOP(token::STAR) { p.bump(); let mt = parse_mt(p); |
