diff options
| author | Michael Sullivan <sully@msully.net> | 2012-06-29 16:26:56 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-06-29 17:41:45 -0700 |
| commit | 98e161f00e8850b0f5c6a3a9f1b22b222c2355b7 (patch) | |
| tree | 4e026fed97dda63a5394b86235a27eeb1015b094 /src/libsyntax/parse/eval.rs | |
| parent | e6baf44f1982d1a5e49cc4a0b5eaeb857418e35e (diff) | |
| download | rust-98e161f00e8850b0f5c6a3a9f1b22b222c2355b7.tar.gz rust-98e161f00e8850b0f5c6a3a9f1b22b222c2355b7.zip | |
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.
Diffstat (limited to 'src/libsyntax/parse/eval.rs')
| -rw-r--r-- | src/libsyntax/parse/eval.rs | 24 |
1 files changed, 12 insertions, 12 deletions
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<str>) - -> (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<str>) - -> ([@ast::view_item]/~, [@ast::item]/~, [ast::attribute]/~) { + -> (~[@ast::view_item], ~[@ast::item], ~[ast::attribute]) { fn companion_file(+prefix: str, suffix: option<str>) -> str { ret alt suffix { @@ -74,11 +74,11 @@ fn parse_companion_mod(cx: ctx, prefix: str, suffix: option<str>) 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); |
