diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-01 17:30:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-01 19:16:06 -0700 |
| commit | b355936b4da0831f47afe8f251daee503c8caa32 (patch) | |
| tree | 9f870e26f773af714cbcf7f315de5ff3722300c3 /src/libsyntax/parse/eval.rs | |
| parent | dc499f193e473abc78c557feaa86969bbe7aa159 (diff) | |
| download | rust-b355936b4da0831f47afe8f251daee503c8caa32.tar.gz rust-b355936b4da0831f47afe8f251daee503c8caa32.zip | |
Convert ret to return
Diffstat (limited to 'src/libsyntax/parse/eval.rs')
| -rw-r--r-- | src/libsyntax/parse/eval.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs index 8a53625be1e..90519c23e5f 100644 --- a/src/libsyntax/parse/eval.rs +++ b/src/libsyntax/parse/eval.rs @@ -28,7 +28,7 @@ fn eval_crate_directives_to_mod(cx: ctx, cdirs: ~[@ast::crate_directive], 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), + return ({view_items: vec::append(view_items, cview_items), items: vec::append(items, citems)}, cattrs); } @@ -47,7 +47,7 @@ fn parse_companion_mod(cx: ctx, prefix: ~str, suffix: option<~str>) -> (~[@ast::view_item], ~[@ast::item], ~[ast::attribute]) { fn companion_file(+prefix: ~str, suffix: option<~str>) -> ~str { - ret alt suffix { + return alt suffix { option::some(s) { path::connect(prefix, s) } option::none { prefix } } + ~".rs"; @@ -72,18 +72,18 @@ fn parse_companion_mod(cx: ctx, prefix: ~str, suffix: option<~str>) let m0 = p0.parse_mod_items(token::EOF, inner_attrs.next); cx.sess.chpos = r0.chpos; cx.sess.byte_pos = cx.sess.byte_pos + r0.pos; - ret (m0.view_items, m0.items, inner_attrs.inner); + return (m0.view_items, m0.items, inner_attrs.inner); } else { - ret (~[], ~[], ~[]); + return (~[], ~[], ~[]); } } 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; + return d; } - none { ret id; } + none { return id; } } } |
