diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-07-06 16:03:43 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-07-06 16:03:51 -0700 |
| commit | 6b8ebc12db1056632531578f91ec20c2d3d2edbf (patch) | |
| tree | 34897e3a3d422e0ee291f45e6a635a75324c3229 /src/libsyntax | |
| parent | 23c73360ca2768ce1fd7ab2be2a2210bb9f728a9 (diff) | |
| download | rust-6b8ebc12db1056632531578f91ec20c2d3d2edbf.tar.gz rust-6b8ebc12db1056632531578f91ec20c2d3d2edbf.zip | |
First step on #2826, accept ^ for ty_ptr.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 3f430f8a988..c94e2acbb2b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -463,7 +463,8 @@ class parser { } mt { ty_uniq(mt) } } - } else if self.token == token::BINOP(token::STAR) { + } else if self.token == token::BINOP(token::STAR) || + self.token == token::BINOP(token::CARET) { self.bump(); ty_ptr(self.parse_mt()) } else if self.token == token::LBRACE { diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index f7acf9ea688..4e6b47db1b2 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -341,7 +341,7 @@ fn print_type_ex(s: ps, &&ty: @ast::ty, print_colons: bool) { print_type(s, mt.ty); word(s.s, "]"); } - ast::ty_ptr(mt) { word(s.s, "*"); print_mt(s, mt); } + ast::ty_ptr(mt) { word(s.s, "^"); print_mt(s, mt); } ast::ty_rptr(region, mt) { alt region.node { ast::re_anon { word(s.s, "&"); } |
