From 98e161f00e8850b0f5c6a3a9f1b22b222c2355b7 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Fri, 29 Jun 2012 16:26:56 -0700 Subject: Switch the compiler over to using ~[] notation instead of []/~. Closes #2759. --- src/libsyntax/parse/eval.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/libsyntax/parse/eval.rs') diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs index efae13342c0..66cfa7b1855 100644 --- a/src/libsyntax/parse/eval.rs +++ b/src/libsyntax/parse/eval.rs @@ -8,25 +8,25 @@ type ctx = cfg: ast::crate_cfg}; fn eval_crate_directives(cx: ctx, - cdirs: [@ast::crate_directive]/~, + cdirs: ~[@ast::crate_directive], prefix: str, - &view_items: [@ast::view_item]/~, - &items: [@ast::item]/~) { + &view_items: ~[@ast::view_item], + &items: ~[@ast::item]) { for cdirs.each {|sub_cdir| eval_crate_directive(cx, sub_cdir, prefix, view_items, items); } } -fn eval_crate_directives_to_mod(cx: ctx, cdirs: [@ast::crate_directive]/~, +fn eval_crate_directives_to_mod(cx: ctx, cdirs: ~[@ast::crate_directive], prefix: str, suffix: option) - -> (ast::_mod, [ast::attribute]/~) { + -> (ast::_mod, ~[ast::attribute]) { #debug("eval crate prefix: %s", prefix); #debug("eval crate suffix: %s", option::get_default(suffix, "none")); let (cview_items, citems, cattrs) = parse_companion_mod(cx, prefix, suffix); - let mut view_items: [@ast::view_item]/~ = []/~; - let mut items: [@ast::item]/~ = []/~; + let mut view_items: ~[@ast::view_item] = ~[]; + let mut items: ~[@ast::item] = ~[]; eval_crate_directives(cx, cdirs, prefix, view_items, items); ret ({view_items: vec::append(view_items, cview_items), items: vec::append(items, citems)}, @@ -44,7 +44,7 @@ We build the path to the companion mod by combining the prefix and the optional suffix then adding the .rs extension. */ fn parse_companion_mod(cx: ctx, prefix: str, suffix: option) - -> ([@ast::view_item]/~, [@ast::item]/~, [ast::attribute]/~) { + -> (~[@ast::view_item], ~[@ast::item], ~[ast::attribute]) { fn companion_file(+prefix: str, suffix: option) -> str { ret alt suffix { @@ -74,11 +74,11 @@ fn parse_companion_mod(cx: ctx, prefix: str, suffix: option) cx.sess.byte_pos = cx.sess.byte_pos + r0.pos; ret (m0.view_items, m0.items, inner_attrs.inner); } else { - ret ([]/~, []/~, []/~); + ret (~[], ~[], ~[]); } } -fn cdir_path_opt(id: ast::ident, attrs: [ast::attribute]/~) -> @str { +fn cdir_path_opt(id: ast::ident, attrs: ~[ast::attribute]) -> @str { alt ::attr::first_attr_value_str_by_name(attrs, "path") { some(d) { ret d; @@ -88,8 +88,8 @@ fn cdir_path_opt(id: ast::ident, attrs: [ast::attribute]/~) -> @str { } fn eval_crate_directive(cx: ctx, cdir: @ast::crate_directive, prefix: str, - &view_items: [@ast::view_item]/~, - &items: [@ast::item]/~) { + &view_items: ~[@ast::view_item], + &items: ~[@ast::item]) { alt cdir.node { ast::cdir_src_mod(id, attrs) { let file_path = cdir_path_opt(@(*id + ".rs"), attrs); -- cgit 1.4.1-3-g733a5