First step on #2826, accept ^ for ty_ptr.
This commit is contained in:
parent
23c73360ca
commit
6b8ebc12db
2 changed files with 3 additions and 2 deletions
|
@ -463,7 +463,8 @@ class parser {
|
||||||
}
|
}
|
||||||
mt { ty_uniq(mt) }
|
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();
|
self.bump();
|
||||||
ty_ptr(self.parse_mt())
|
ty_ptr(self.parse_mt())
|
||||||
} else if self.token == token::LBRACE {
|
} 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);
|
print_type(s, mt.ty);
|
||||||
word(s.s, "]");
|
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) {
|
ast::ty_rptr(region, mt) {
|
||||||
alt region.node {
|
alt region.node {
|
||||||
ast::re_anon { word(s.s, "&"); }
|
ast::re_anon { word(s.s, "&"); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue