Skip to content

Commit 6b8ebc1

Browse files
committedJul 6, 2012
First step on #2826, accept ^ for ty_ptr.
1 parent 23c7336 commit 6b8ebc1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/libsyntax/parse/parser.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ class parser {
463463
}
464464
mt { ty_uniq(mt) }
465465
}
466-
} else if self.token == token::BINOP(token::STAR) {
466+
} else if self.token == token::BINOP(token::STAR) ||
467+
self.token == token::BINOP(token::CARET) {
467468
self.bump();
468469
ty_ptr(self.parse_mt())
469470
} else if self.token == token::LBRACE {

‎src/libsyntax/print/pprust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ fn print_type_ex(s: ps, &&ty: @ast::ty, print_colons: bool) {
341341
print_type(s, mt.ty);
342342
word(s.s, "]");
343343
}
344-
ast::ty_ptr(mt) { word(s.s, "*"); print_mt(s, mt); }
344+
ast::ty_ptr(mt) { word(s.s, "^"); print_mt(s, mt); }
345345
ast::ty_rptr(region, mt) {
346346
alt region.node {
347347
ast::re_anon { word(s.s, "&"); }

0 commit comments

Comments
 (0)