diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-26 16:54:31 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-27 14:37:04 -0700 |
| commit | 0c6e470a257fc546555aa10ededded4a77460a71 (patch) | |
| tree | fb54281612401dba521efedab7626474c80195a9 /src/libsyntax | |
| parent | 3a1582012eafb8b672e15b12b5424e72ea6096af (diff) | |
| download | rust-0c6e470a257fc546555aa10ededded4a77460a71.tar.gz rust-0c6e470a257fc546555aa10ededded4a77460a71.zip | |
Convert core::result to camel case
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/parse.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/eval.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 09dc48e0929..2af871ba123 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -72,8 +72,8 @@ fn expand_include_str(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg, let res = io::read_whole_file_str(&res_rel_file(cx, sp, &Path(file))); match res { - result::ok(_) => { /* Continue. */ } - result::err(e) => { + result::Ok(_) => { /* Continue. */ } + result::Err(e) => { cx.parse_sess().span_diagnostic.handler().fatal(e); } } @@ -88,13 +88,13 @@ fn expand_include_bin(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg, let file = expr_to_str(cx, args[0], ~"#include_bin requires a string"); match io::read_whole_file(&res_rel_file(cx, sp, &Path(file))) { - result::ok(src) => { + result::Ok(src) => { let u8_exprs = vec::map(src, |char: u8| { mk_u8(cx, sp, char) }); return mk_base_vec_e(cx, sp, u8_exprs); } - result::err(e) => { + result::Err(e) => { cx.parse_sess().span_diagnostic.handler().fatal(e) } } diff --git a/src/libsyntax/parse.rs b/src/libsyntax/parse.rs index 41cb285f7db..82a3c4ce6c5 100644 --- a/src/libsyntax/parse.rs +++ b/src/libsyntax/parse.rs @@ -187,8 +187,8 @@ fn new_parser_etc_from_file(sess: parse_sess, cfg: ast::crate_cfg, (parser, string_reader) { let res = io::read_whole_file_str(path); match res { - result::ok(_) => { /* Continue. */ } - result::err(e) => sess.span_diagnostic.handler().fatal(e) + result::Ok(_) => { /* Continue. */ } + result::Err(e) => sess.span_diagnostic.handler().fatal(e) } let src = @result::unwrap(res); let filemap = codemap::new_filemap(path.to_str(), src, diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs index 2a4516f80aa..39f8bb59c1f 100644 --- a/src/libsyntax/parse/eval.rs +++ b/src/libsyntax/parse/eval.rs @@ -54,8 +54,8 @@ fn parse_companion_mod(cx: ctx, prefix: &Path, suffix: &Option<Path>) // Crude, but there's no lib function for this and I'm not // up to writing it just now match io::file_reader(path) { - result::ok(_) => true, - result::err(_) => false + result::Ok(_) => true, + result::Err(_) => false } } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a98be8ec1d0..f73d4163e9c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1,6 +1,6 @@ import print::pprust::expr_to_str; -import result::result; +import result::Result; import either::{Either, Left, Right}; import std::map::{hashmap, str_hash}; import token::{can_begin_expr, is_ident, is_ident_or_path, is_plain_ident, |
