First step on #2826, accept ^ for ty_ptr.
This commit is contained in:
parent
23c73360ca
commit
6b8ebc12db
@ -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 {
|
||||
|
@ -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, "&"); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user