Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.
This commit is contained in:
parent
e6baf44f19
commit
98e161f00e
420 changed files with 4077 additions and 4078 deletions
|
@ -33,33 +33,33 @@ fn mk_unary(cx: ext_ctxt, sp: span, op: ast::unop, e: @ast::expr)
|
|||
cx.next_id(); // see ast_util::op_expr_callee_id
|
||||
mk_expr(cx, sp, ast::expr_unary(op, e))
|
||||
}
|
||||
fn mk_path(cx: ext_ctxt, sp: span, idents: [ast::ident]/~) ->
|
||||
fn mk_path(cx: ext_ctxt, sp: span, idents: ~[ast::ident]) ->
|
||||
@ast::expr {
|
||||
let path = @{span: sp, global: false, idents: idents,
|
||||
rp: none, types: []/~};
|
||||
rp: none, types: ~[]};
|
||||
let pathexpr = ast::expr_path(path);
|
||||
mk_expr(cx, sp, pathexpr)
|
||||
}
|
||||
fn mk_access_(cx: ext_ctxt, sp: span, p: @ast::expr, m: ast::ident)
|
||||
-> @ast::expr {
|
||||
mk_expr(cx, sp, ast::expr_field(p, m, []/~))
|
||||
mk_expr(cx, sp, ast::expr_field(p, m, ~[]))
|
||||
}
|
||||
fn mk_access(cx: ext_ctxt, sp: span, p: [ast::ident]/~, m: ast::ident)
|
||||
fn mk_access(cx: ext_ctxt, sp: span, p: ~[ast::ident], m: ast::ident)
|
||||
-> @ast::expr {
|
||||
let pathexpr = mk_path(cx, sp, p);
|
||||
ret mk_access_(cx, sp, pathexpr, m);
|
||||
}
|
||||
fn mk_call_(cx: ext_ctxt, sp: span, fn_expr: @ast::expr,
|
||||
args: [@ast::expr]/~) -> @ast::expr {
|
||||
args: ~[@ast::expr]) -> @ast::expr {
|
||||
mk_expr(cx, sp, ast::expr_call(fn_expr, args, false))
|
||||
}
|
||||
fn mk_call(cx: ext_ctxt, sp: span, fn_path: [ast::ident]/~,
|
||||
args: [@ast::expr]/~) -> @ast::expr {
|
||||
fn mk_call(cx: ext_ctxt, sp: span, fn_path: ~[ast::ident],
|
||||
args: ~[@ast::expr]) -> @ast::expr {
|
||||
let pathexpr = mk_path(cx, sp, fn_path);
|
||||
ret mk_call_(cx, sp, pathexpr, args);
|
||||
}
|
||||
// e = expr, t = type
|
||||
fn mk_base_vec_e(cx: ext_ctxt, sp: span, exprs: [@ast::expr]/~) ->
|
||||
fn mk_base_vec_e(cx: ext_ctxt, sp: span, exprs: ~[@ast::expr]) ->
|
||||
@ast::expr {
|
||||
let vecexpr = ast::expr_vec(exprs, ast::m_imm);
|
||||
ret @{id: cx.next_id(), node: vecexpr, span: sp};
|
||||
|
@ -68,19 +68,19 @@ fn mk_vstore_e(cx: ext_ctxt, sp: span, expr: @ast::expr, vst: ast::vstore) ->
|
|||
@ast::expr {
|
||||
mk_expr(cx, sp, ast::expr_vstore(expr, vst))
|
||||
}
|
||||
fn mk_uniq_vec_e(cx: ext_ctxt, sp: span, exprs: [@ast::expr]/~) ->
|
||||
fn mk_uniq_vec_e(cx: ext_ctxt, sp: span, exprs: ~[@ast::expr]) ->
|
||||
@ast::expr {
|
||||
mk_vstore_e(cx, sp, mk_base_vec_e(cx, sp, exprs), ast::vstore_uniq)
|
||||
}
|
||||
fn mk_fixed_vec_e(cx: ext_ctxt, sp: span, exprs: [@ast::expr]/~) ->
|
||||
fn mk_fixed_vec_e(cx: ext_ctxt, sp: span, exprs: ~[@ast::expr]) ->
|
||||
@ast::expr {
|
||||
mk_vstore_e(cx, sp, mk_base_vec_e(cx, sp, exprs), ast::vstore_fixed(none))
|
||||
}
|
||||
|
||||
fn mk_rec_e(cx: ext_ctxt, sp: span,
|
||||
fields: [{ident: ast::ident, ex: @ast::expr}]/~) ->
|
||||
fields: ~[{ident: ast::ident, ex: @ast::expr}]) ->
|
||||
@ast::expr {
|
||||
let mut astfields: [ast::field]/~ = []/~;
|
||||
let mut astfields: ~[ast::field] = ~[];
|
||||
for fields.each {|field|
|
||||
let ident = field.ident;
|
||||
let val = field.ex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue