about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-12 14:47:24 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-12 16:13:13 -0700
commit594c7fb0c6eb997afa7da32a2a6b4f0f78522c3f (patch)
tree74758d80c810e1bd3b13eee6a7a2703eee005a37
parent12b03dd3d444f8b78bef2d69c1aab88e5b1cbf4b (diff)
Remove the last remaining vec expressions in rustc
-rw-r--r--src/comp/middle/ty.rs13
-rw-r--r--src/comp/syntax/ext/simplext.rs6
2 files changed, 11 insertions, 8 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index c631e9bbd4a..37dcce69a50 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -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));
 }
diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs
index 5a07dc76044..77366f81dc7 100644
--- a/src/comp/syntax/ext/simplext.rs
+++ b/src/comp/syntax/ext/simplext.rs
@@ -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 }
                 }