From 6b8ebc12db1056632531578f91ec20c2d3d2edbf Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 6 Jul 2012 16:03:43 -0700 Subject: First step on #2826, accept ^ for ty_ptr. --- src/libsyntax/parse/parser.rs | 3 ++- src/libsyntax/print/pprust.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libsyntax') 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, "&"); } -- cgit 1.4.1-3-g733a5