rustc: Make constraint args in the AST interior vectors

This commit is contained in:
Patrick Walton 2011-07-06 16:19:19 -07:00
parent f164d7779a
commit 2f29f9931d
2 changed files with 4 additions and 3 deletions

View File

@ -426,7 +426,7 @@ fn ty_mach_to_str(ty_mach tm) -> str {
type constr_arg_general[T] = spanned[constr_arg_general_[T]];
type constr_ = rec(path path,
vec[@constr_arg_general[uint]] args,
(@constr_arg_general[uint])[] args,
node_id id);
type constr = spanned[constr_];

View File

@ -351,8 +351,9 @@ fn parse_ty_constr(&vec[ast::arg] fn_args, &parser p) -> @ast::constr {
auto lo = p.get_lo_pos();
auto path = parse_path(p);
auto pf = bind parse_constr_arg(fn_args, _);
let rec(vec[@ast::constr_arg] node, span span) args =
parse_seq(token::LPAREN, token::RPAREN, some(token::COMMA), pf, p);
let rec((@ast::constr_arg)[] node, span span) args =
parse_seq_ivec(token::LPAREN, token::RPAREN, some(token::COMMA), pf,
p);
// FIXME fix the def_id
ret @spanned(lo, args.span.hi,