Remove the last remaining vec expressions in rustc

This commit is contained in:
Brian Anderson 2011-08-12 14:47:24 -07:00
parent 12b03dd3d4
commit 594c7fb0c6
2 changed files with 11 additions and 8 deletions

View File

@ -3064,11 +3064,14 @@ fn is_binopable(cx: &ctxt, ty: t, op: ast::binop) -> bool {
/*vec*/
/*bot*/
tbl =
[[f, f, f, f, t, t, f, f], [f, f, f, f, t, t, t, t],
[t, t, t, t, t, t, t, f], [t, t, t, f, t, t, f, f],
[t, f, f, f, t, t, f, f], [t, f, f, f, t, t, f, f],
[f, f, f, f, t, t, f, f],
[t, t, t, t, t, t, t, t]]; /*struct*/
~[~[f, f, f, f, t, t, f, f],
~[f, f, f, f, t, t, t, t],
~[t, t, t, t, t, t, t, f],
~[t, t, t, f, t, t, f, f],
~[t, f, f, f, t, t, f, f],
~[t, f, f, f, t, t, f, f],
~[f, f, f, f, t, t, f, f],
~[t, t, t, t, t, t, t, t]]; /*struct*/
ret tbl.(tycat(cx, ty)).(opcat(op));
}

View File

@ -583,15 +583,15 @@ fn p_t_s_r_ellipses(cx: &ext_ctxt, repeat_me: @expr, offset: uint,
match_expr(e) {
alt e.node {
expr_vec(arg_elts, _, _) {
let elts = [];
let elts = ~[];
let idx = offset;
while idx < ivec::len(arg_elts) {
elts += [leaf(match_expr(arg_elts.(idx)))];
elts += ~[leaf(match_expr(arg_elts.(idx)))];
idx += 1u;
}
// using repeat_me.span is a little wacky, but the
// error we want to report is one in the macro def
some(seq(@ivec::from_vec(elts), repeat_me.span))
some(seq(@elts, repeat_me.span))
}
_ { none }
}