]> git.lizzy.rs Git - rust.git/commitdiff
Remove support for the '.' after a nullary tag in a pattern
authorTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 09:03:57 +0000 (01:03 -0800)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 09:04:59 +0000 (01:04 -0800)
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)

42 files changed:
src/comp/back/link.rs
src/comp/back/rpath.rs
src/comp/driver/driver.rs
src/comp/driver/rustc.rs
src/comp/metadata/creader.rs
src/comp/middle/debuginfo.rs
src/comp/middle/gc.rs
src/comp/middle/mut.rs
src/comp/middle/shape.rs
src/comp/middle/trans.rs
src/comp/middle/trans_closure.rs
src/comp/middle/trans_common.rs
src/comp/middle/ty.rs
src/comp/middle/typeck.rs
src/comp/syntax/fold.rs
src/comp/syntax/parse/parser.rs
src/comp/syntax/print/pprust.rs
src/comp/util/ppaux.rs
src/fuzzer/fuzzer.rs
src/libcore/vec.rs
src/libstd/linux_os.rs
src/libstd/macos_os.rs
src/rustdoc/attr_pass.rs
src/test/bench/99bob-pattern.rs
src/test/bench/task-perf-word-count.rs
src/test/compile-fail/alt-tag-nullary.rs
src/test/run-fail/alt-bot-fail.rs
src/test/run-fail/non-exhaustive-match.rs
src/test/run-pass/alt-join.rs
src/test/run-pass/alt-path.rs
src/test/run-pass/alt-pattern-no-type-params.rs
src/test/run-pass/alt-phi.rs
src/test/run-pass/alt-str.rs
src/test/run-pass/issue-687.rs
src/test/run-pass/nested-alts.rs
src/test/run-pass/nullary-or-pattern.rs
src/test/run-pass/or-pattern.rs
src/test/run-pass/simple-alt-generic-tag.rs
src/test/run-pass/size-and-align.rs
src/test/run-pass/tag-variant-disr-val.rs
src/test/run-pass/use-uninit-alt.rs
src/test/run-pass/use-uninit-alt2.rs

index a4c35178e3e7aca89670b8112f42f4f9ea4776bf..c7a195db90a211eb74f2a1ea076d4212b2f39987 100644 (file)
@@ -583,9 +583,9 @@ fn rmext(filename: str) -> str {
             ret str::connect(parts, ".");
         }
         ret alt config.os {
-              session::os_macos. { rmext(rmlib(filename)) }
-              session::os_linux. { rmext(rmlib(filename)) }
-              session::os_freebsd. { rmext(rmlib(filename)) }
+              session::os_macos { rmext(rmlib(filename)) }
+              session::os_linux { rmext(rmlib(filename)) }
+              session::os_freebsd { rmext(rmlib(filename)) }
               _ { rmext(filename) }
             };
     }
index 417d553c36afaa145073ace33618333055411bcc..b848ca9459092145911dc341ef4e1229fcdd99aa 100644 (file)
@@ -102,9 +102,9 @@ fn get_rpath_relative_to_output(os: session::os,
                                 &&lib: fs::path) -> str {
     // Mac doesn't appear to support $ORIGIN
     let prefix = alt os {
-        session::os_linux. { "$ORIGIN" + fs::path_sep() }
-        session::os_freebsd. { "$ORIGIN" + fs::path_sep() }
-        session::os_macos. { "@executable_path" + fs::path_sep() }
+        session::os_linux { "$ORIGIN" + fs::path_sep() }
+        session::os_freebsd { "$ORIGIN" + fs::path_sep() }
+        session::os_macos { "@executable_path" + fs::path_sep() }
     };
 
     prefix + get_relative_to(
index 5b80461133584d946fed0f63cb5b1ff2e59740c5..be5e4ea65fbf00f590d71f3bab3594a4648dd3fa 100644 (file)
@@ -24,19 +24,19 @@ fn default_configuration(sess: session, argv0: str, input: str) ->
    ast::crate_cfg {
     let libc =
         alt sess.targ_cfg.os {
-          session::os_win32. { "msvcrt.dll" }
-          session::os_macos. { "libc.dylib" }
-          session::os_linux. { "libc.so.6" }
-          session::os_freebsd. { "libc.so.7" }
+          session::os_win32 { "msvcrt.dll" }
+          session::os_macos { "libc.dylib" }
+          session::os_linux { "libc.so.6" }
+          session::os_freebsd { "libc.so.7" }
           _ { "libc.so" }
         };
 
     let mk = attr::mk_name_value_item_str;
 
     let arch = alt sess.targ_cfg.arch {
-      session::arch_x86. { "x86" }
-      session::arch_x86_64. { "x86_64" }
-      session::arch_arm. { "arm" }
+      session::arch_x86 { "x86" }
+      session::arch_x86_64 { "x86_64" }
+      session::arch_arm { "arm" }
     };
 
     ret [ // Target bindings.
@@ -340,14 +340,14 @@ fn build_target_config(sopts: @session::options,
                           "Unknown architecture! " + sopts.target_triple) }
     };
     let (int_type, uint_type, float_type) = alt arch {
-      session::arch_x86. {(ast::ty_i32, ast::ty_u32, ast::ty_f64)}
-      session::arch_x86_64. {(ast::ty_i64, ast::ty_u64, ast::ty_f64)}
-      session::arch_arm. {(ast::ty_i32, ast::ty_u32, ast::ty_f64)}
+      session::arch_x86 {(ast::ty_i32, ast::ty_u32, ast::ty_f64)}
+      session::arch_x86_64 {(ast::ty_i64, ast::ty_u64, ast::ty_f64)}
+      session::arch_arm {(ast::ty_i32, ast::ty_u32, ast::ty_f64)}
     };
     let target_strs = alt arch {
-      session::arch_x86. {x86::get_target_strs(os)}
-      session::arch_x86_64. {x86_64::get_target_strs(os)}
-      session::arch_arm. {x86::get_target_strs(os)}
+      session::arch_x86 {x86::get_target_strs(os)}
+      session::arch_x86_64 {x86_64::get_target_strs(os)}
+      session::arch_arm {x86::get_target_strs(os)}
     };
     let target_cfg: @session::config =
         @{os: os, arch: arch, target_strs: target_strs, int_type: int_type,
@@ -406,7 +406,7 @@ fn build_session_options(match: getopts::match,
     let no_asm_comments = getopts::opt_present(match, "no-asm-comments");
     alt output_type {
       // unless we're emitting huamn-readable assembly, omit comments.
-      link::output_type_llvm_assembly. | link::output_type_assembly. {}
+      link::output_type_llvm_assembly | link::output_type_assembly {}
       _ { no_asm_comments = true; }
     }
     let opt_level: uint =
@@ -540,10 +540,10 @@ fn build_output_filenames(ifile: str,
         alt sopts.output_type {
           link::output_type_none { "none" }
           link::output_type_bitcode { "bc" }
-          link::output_type_assembly. { "s" }
-          link::output_type_llvm_assembly. { "ll" }
+          link::output_type_assembly { "s" }
+          link::output_type_llvm_assembly { "ll" }
           // Object and exe output both use the '.o' extension here
-          link::output_type_object. | link::output_type_exe. {
+          link::output_type_object | link::output_type_exe {
             "o"
           }
         };
index e7447cc446b94dc6bee3672f20896bc8b87c2672..bd4c04715989ed470b7adc3d9e7d30e025fa6f6b 100644 (file)
@@ -102,7 +102,7 @@ fn run_compiler(args: [str], demitter: diagnostic::emitter) {
                     bind parse_pretty(sess, _));
     alt pretty {
       some::<pp_mode>(ppm) { pretty_print_input(sess, cfg, ifile, ppm); ret; }
-      none::<pp_mode>. {/* continue */ }
+      none::<pp_mode> {/* continue */ }
     }
     let ls = opt_present(match, "ls");
     if ls {
index 93a6f76130600df43435ba66a6f7e463a457e612..e4e39730350d07f87a0eb6ad81cf5f5f885f6c89 100644 (file)
@@ -128,10 +128,10 @@ fn default_native_lib_naming(sess: session::session, static: bool) ->
    {prefix: str, suffix: str} {
     if static { ret {prefix: "lib", suffix: ".rlib"}; }
     alt sess.targ_cfg.os {
-      session::os_win32. { ret {prefix: "", suffix: ".dll"}; }
-      session::os_macos. { ret {prefix: "lib", suffix: ".dylib"}; }
-      session::os_linux. { ret {prefix: "lib", suffix: ".so"}; }
-      session::os_freebsd. { ret {prefix: "lib", suffix: ".so"}; }
+      session::os_win32 { ret {prefix: "", suffix: ".dll"}; }
+      session::os_macos { ret {prefix: "lib", suffix: ".dylib"}; }
+      session::os_linux { ret {prefix: "lib", suffix: ".so"}; }
+      session::os_freebsd { ret {prefix: "lib", suffix: ".so"}; }
     }
 }
 
index 0a0259ec584aa1f8a3ed597c4dfc60d15106a786..096fc2fb99d03f4172ba476f8f52bb9ed571f221 100644 (file)
@@ -583,7 +583,7 @@ fn t_to_ty(cx: @crate_ctxt, t: ty::t, span: codemap::span) -> @ast::ty {
         ret create_pointer_type(cx, t, ty.span, md);
       }
 
-      ast::ty_infer. {
+      ast::ty_infer {
         let inferred = t_to_ty(cx, t, ty.span);
         ret create_ty(cx, t, inferred);
       }
index f67ac128b5e7ab7fd5b97bbf1e177a557b67643d..86093c5febb5d4dbc76a3244eb9aeeab917578b6 100644 (file)
@@ -105,8 +105,7 @@ fn type_is_gc_relevant(cx: ty::ctxt, ty: ty::t) -> bool {
     alt ty::struct(cx, ty) {
       ty::ty_nil | ty::ty_bot | ty::ty_bool | ty::ty_int(_) |
       ty::ty_float(_) | ty::ty_uint(_) | ty::ty_str |
-      ty::ty_type | ty::ty_native(_) | ty::ty_ptr(_) | ty::ty_type. |
-      ty::ty_native(_) {
+      ty::ty_type | ty::ty_ptr(_) | ty::ty_native(_) {
         ret false;
       }
 
index d67a03d4a53b3c88667a584b213a23bc8403c476..0eebf4e1ef9e4df728ab833ac02673bfa542b037 100644 (file)
@@ -187,9 +187,9 @@ fn check_lval(cx: @ctx, dest: @expr, msg: msg) {
         } else if !root.ds[0].mut {
             let name =
                 alt root.ds[0].kind {
-                  mut::unbox. { "immutable box" }
-                  mut::field. { "immutable field" }
-                  mut::index. { "immutable vec content" }
+                  mut::unbox { "immutable box" }
+                  mut::field { "immutable field" }
+                  mut::index { "immutable vec content" }
                 };
             mk_err(cx, dest.span, msg, name);
         }
index 39835854fea7af4681d18a2a3e267bbed7057cc3..9986400dfa32501871168f43bd8219ab033d96bd 100644 (file)
@@ -246,25 +246,25 @@ fn tag_kind(ccx: @crate_ctxt, did: ast::def_id) -> tag_kind {
 // Returns the code corresponding to the pointer size on this architecture.
 fn s_int(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_i32 }
-        session::arch_x86_64. { shape_i64 }
-        session::arch_arm. { shape_i32 }
+        session::arch_x86 { shape_i32 }
+        session::arch_x86_64 { shape_i64 }
+        session::arch_arm { shape_i32 }
     };
 }
 
 fn s_uint(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_u32 }
-        session::arch_x86_64. { shape_u64 }
-        session::arch_arm. { shape_u32 }
+        session::arch_x86 { shape_u32 }
+        session::arch_x86_64 { shape_u64 }
+        session::arch_arm { shape_u32 }
     };
 }
 
 fn s_float(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_f64 }
-        session::arch_x86_64. { shape_f64 }
-        session::arch_arm. { shape_f64 }
+        session::arch_x86 { shape_f64 }
+        session::arch_x86_64 { shape_f64 }
+        session::arch_arm { shape_f64 }
     };
 }
 
index 825a76f32b12e06edd7ad595ef870427e9231a14..c519461887dc7f1ea026baccd241ebf451c49122 100644 (file)
@@ -1904,8 +1904,8 @@ fn call_memmove(cx: @block_ctxt, dst: ValueRef, src: ValueRef,
 
     let ccx = bcx_ccx(cx);
     let key = alt ccx.sess.targ_cfg.arch {
-      session::arch_x86. | session::arch_arm. { "llvm.memmove.p0i8.p0i8.i32" }
-      session::arch_x86_64. { "llvm.memmove.p0i8.p0i8.i64" }
+      session::arch_x86 | session::arch_arm { "llvm.memmove.p0i8.p0i8.i32" }
+      session::arch_x86_64 { "llvm.memmove.p0i8.p0i8.i64" }
     };
     let i = ccx.intrinsics;
     assert (i.contains_key(key));
@@ -2915,10 +2915,10 @@ fn t_kind(tcx: ty::ctxt, t: ty::t) -> kind {
 
     let newval =
         alt {in: k_in, out: k_out} {
-          {in: integral, out: integral.} {
+          {in: integral, out: integral} {
             int_cast(e_res.bcx, ll_t_out, ll_t_in, e_res.val, s_in)
           }
-          {in: float, out: float.} {
+          {in: float, out: float} {
             float_cast(e_res.bcx, ll_t_out, ll_t_in, e_res.val)
           }
           {in: integral, out: float} {
@@ -2937,10 +2937,10 @@ fn t_kind(tcx: ty::ctxt, t: ty::t) -> kind {
           {in: pointer, out: integral} {
             PtrToInt(e_res.bcx, e_res.val, ll_t_out)
           }
-          {in: pointer, out: pointer.} {
+          {in: pointer, out: pointer} {
             PointerCast(e_res.bcx, e_res.val, ll_t_out)
           }
-          {in: tag_, out: integral} | {in: tag_., out: float} {
+          {in: tag_, out: integral} | {in: tag_, out: float} {
             let cx = e_res.bcx;
             let lltagty = T_opaque_tag_ptr(ccx);
             let av_tag = PointerCast(cx, e_res.val, lltagty);
@@ -3559,11 +3559,11 @@ fn trans_expr(bcx: @block_ctxt, e: @ast::expr, dest: dest) -> @block_ctxt {
         assert dest == ignore;
         ret trans_check_expr(bcx, a, "Assertion");
       }
-      ast::expr_check(ast::checked_expr., a) {
+      ast::expr_check(ast::checked_expr, a) {
         assert dest == ignore;
         ret trans_check_expr(bcx, a, "Predicate");
       }
-      ast::expr_check(ast::claimed_expr., a) {
+      ast::expr_check(ast::claimed_expr, a) {
         assert dest == ignore;
         /* Claims are turned on and off by a global variable
            that the RTS sets. This case generates code to
@@ -3945,8 +3945,8 @@ fn zero_alloca(cx: @block_ctxt, llptr: ValueRef, t: ty::t)
         Store(bcx, C_null(llty), llptr);
     } else {
         let key = alt ccx.sess.targ_cfg.arch {
-          session::arch_x86. | session::arch_arm. { "llvm.memset.p0i8.i32" }
-          session::arch_x86_64. { "llvm.memset.p0i8.i64" }
+          session::arch_x86 | session::arch_arm { "llvm.memset.p0i8.i32" }
+          session::arch_x86_64 { "llvm.memset.p0i8.i64" }
         };
         let i = ccx.intrinsics;
         let memset = i.get(key);
@@ -4841,9 +4841,9 @@ fn build_wrap_fn(lcx: @local_ctxt,
     let ccx = lcx_ccx(lcx);
     let cc = lib::llvm::LLVMCCallConv;
     alt abi {
-      ast::native_abi_rust_intrinsic. { ret; }
-      ast::native_abi_cdecl. { cc = lib::llvm::LLVMCCallConv; }
-      ast::native_abi_stdcall. { cc = lib::llvm::LLVMX86StdcallCallConv; }
+      ast::native_abi_rust_intrinsic { ret; }
+      ast::native_abi_cdecl { cc = lib::llvm::LLVMCCallConv; }
+      ast::native_abi_stdcall { cc = lib::llvm::LLVMX86StdcallCallConv; }
     }
 
     for native_item in native_mod.items {
@@ -5143,7 +5143,7 @@ fn collect_native_item(ccx: @crate_ctxt,
                 }
             };
         alt fn_abi {
-          ast::native_abi_rust_intrinsic. {
+          ast::native_abi_rust_intrinsic {
             // For intrinsics: link the function directly to the intrinsic
             // function itself.
             let fn_type = type_of_fn_from_ty(
@@ -5157,7 +5157,7 @@ fn collect_native_item(ccx: @crate_ctxt,
             ccx.item_symbols.insert(id, ri_name);
           }
 
-          ast::native_abi_cdecl. | ast::native_abi_stdcall. {
+          ast::native_abi_cdecl | ast::native_abi_stdcall {
             // For true external functions: create a rust wrapper
             // and link to that.  The rust wrapper will handle
             // switching to the C stack.
index 66002c899799eacb6d4e3cdf2dfd55fd74fe9fbe..1e58ea53f9f13c13d77ddc22db470481f85e8753 100644 (file)
@@ -419,18 +419,18 @@ fn build_closure(bcx0: @block_ctxt,
         let nid = ast_util::def_id_of_def(cap_var.def).node;
         let ty = ty::node_id_to_monotype(tcx, nid);
         alt cap_var.mode {
-          capture::cap_ref. {
+          capture::cap_ref {
             assert ck == ty::ck_block;
             ty = ty::mk_mut_ptr(tcx, ty);
             env_vals += [env_ref(lv.val, ty, lv.kind)];
           }
-          capture::cap_copy. {
+          capture::cap_copy {
             env_vals += [env_copy(lv.val, ty, lv.kind)];
           }
-          capture::cap_move. {
+          capture::cap_move {
             env_vals += [env_move(lv.val, ty, lv.kind)];
           }
-          capture::cap_drop. {
+          capture::cap_drop {
             bcx = drop_ty(bcx, lv.val, ty);
           }
         }
@@ -481,7 +481,7 @@ fn load_environment(enclosing_cx: @block_ctxt,
     let i = 0u;
     vec::iter(cap_vars) { |cap_var|
         alt cap_var.mode {
-          capture::cap_drop. { /* ignore */ }
+          capture::cap_drop { /* ignore */ }
           _ {
             check type_is_tup_like(bcx, cbox_ty);
             let upvarptr = GEP_tup_like(
index db1e615804f309c999ffd15a43a321ac2cabbaaf..0a2045dcb2b144fa870fcbbaf675057f1927b7c3 100644 (file)
@@ -483,9 +483,9 @@ fn T_nil() -> TypeRef {
 
 fn T_int(targ_cfg: @session::config) -> TypeRef {
     ret alt targ_cfg.arch {
-      session::arch_x86. { T_i32() }
-      session::arch_x86_64. { T_i64() }
-      session::arch_arm. { T_i32() }
+      session::arch_x86 { T_i32() }
+      session::arch_x86_64 { T_i64() }
+      session::arch_arm { T_i32() }
     };
 }
 
@@ -520,9 +520,9 @@ fn T_float_ty(cx: @crate_ctxt, t: ast::float_ty) -> TypeRef {
 
 fn T_float(targ_cfg: @session::config) -> TypeRef {
     ret alt targ_cfg.arch {
-      session::arch_x86. { T_f64() }
-      session::arch_x86_64. { T_f64() }
-      session::arch_arm. { T_f64() }
+      session::arch_x86 { T_f64() }
+      session::arch_x86_64 { T_f64() }
+      session::arch_arm { T_f64() }
     };
 }
 
index b376af652aa2436da45aba7853f3c591b0d2cf56..03802e04d88f4587322dc82858e6c58c3cfb19e7 100644 (file)
@@ -2534,7 +2534,7 @@ fn type_err_to_str(err: ty::type_err) -> str {
         fn to_str(s: ast::ret_style) -> str {
             alt s {
               ast::noreturn { "non-returning" }
-              ast::return_val. { "return-by-value" }
+              ast::return_val { "return-by-value" }
             }
         }
         ret to_str(actual) + " function found where " + to_str(expect) +
index ea64d5f3f11950387817c63723f19a456cdb4451..cb159a54c8ce7885ab20f89cd92a9375b1b72bf9 100644 (file)
@@ -358,7 +358,7 @@ fn instantiate(tcx: ty::ctxt, sp: span, mode: mode,
         }
         typ = ty::mk_constr(tcx, ast_ty_to_ty(tcx, mode, t), out_cs);
       }
-      ast::ty_infer. {
+      ast::ty_infer {
         alt mode {
           m_check_tyvar(fcx) { ret next_ty_var(fcx); }
           _ { tcx.sess.span_bug(ast_ty.span,
@@ -539,7 +539,7 @@ fn ast_ty_to_ty_crate(ccx: @crate_ctxt, &&ast_ty: @ast::ty) -> ty::t {
 fn ast_ty_to_ty_crate_infer(ccx: @crate_ctxt, &&ast_ty: @ast::ty) ->
    option::t<ty::t> {
     alt ast_ty.node {
-      ast::ty_infer. { none }
+      ast::ty_infer { none }
       _ { some(ast_ty_to_ty_crate(ccx, ast_ty)) }
     }
 }
@@ -2406,9 +2406,9 @@ fn check_block_no_value(fcx: @fn_ctxt, blk: ast::blk) -> bool {
 
 fn check_block(fcx0: @fn_ctxt, blk: ast::blk) -> bool {
     let fcx = alt blk.node.rules {
-      ast::unchecked_blk. { @{purity: ast::impure_fn with *fcx0} }
-      ast::unsafe_blk. { @{purity: ast::unsafe_fn with *fcx0} }
-      ast::default_blk. { fcx0 }
+      ast::unchecked_blk { @{purity: ast::impure_fn with *fcx0} }
+      ast::unsafe_blk { @{purity: ast::unsafe_fn with *fcx0} }
+      ast::default_blk { fcx0 }
     };
     let bot = false;
     let warned = false;
@@ -2745,7 +2745,7 @@ fn check_main_fn_ty(tcx: ty::ctxt, main_id: ast::node_id) {
     let main_t = ty::node_id_to_monotype(tcx, main_id);
     alt ty::struct(tcx, main_t) {
       ty::ty_fn({proto: ast::proto_bare, inputs, output,
-                 ret_style: ast::return_val., constraints}) {
+                 ret_style: ast::return_val, constraints}) {
         let ok = vec::len(constraints) == 0u;
         ok &= ty::type_is_nil(tcx, output);
         let num_args = vec::len(inputs);
index 980950cf545ef052198698379840f67ceffb7124..4d9b697297fbf8a522d860da5b3ef18a97c61d09 100644 (file)
@@ -453,7 +453,7 @@ fn noop_fold_local(l: local_, fld: ast_fold) -> local_ {
          pat: fld.fold_pat(l.pat),
          init:
              alt l.init {
-               option::none::<initializer>. { l.init }
+               option::none::<initializer> { l.init }
                option::some::<initializer>(init) {
                  option::some::<initializer>({op: init.op,
                                               expr: fld.fold_expr(init.expr)})
index 7515a393ee9e90ec742cfe8e0553da6d1a836fca..0da193c20785b9ed1dade38f48b1e476b5545579 100644 (file)
@@ -1485,8 +1485,6 @@ fn parse_pat(p: parser) -> @ast::pat {
             }
         } else if is_plain_ident(p) &&
                       alt p.look_ahead(1u) {
-                    // Take this out once the libraries change
-                        token::DOT |
                         token::LPAREN | token::LBRACKET |
                             token::LT {
                           false
@@ -1508,8 +1506,6 @@ fn parse_pat(p: parser) -> @ast::pat {
                 args = a.node;
                 hi = a.span.hi;
               }
-              // take this out once the libraries change
-              token::DOT. { args = []; p.bump(); }
               _ { args = []; }
             }
             // at this point, we're not sure whether it's a tag or a bind
index ebf5484af35b7b934a5e32b0b36654e9ab1e4f4c..f4aa5646d0b7b89012c4152eacc5d4a63ba33d96 100644 (file)
@@ -275,7 +275,7 @@ fn print_type(s: ps, &&ty: @ast::ty) {
         word(s.s, "]");
       }
       ast::ty_ptr(mt) { word(s.s, "*"); print_mt(s, mt); }
-      ast::ty_task. { word(s.s, "task"); }
+      ast::ty_task { word(s.s, "task"); }
       ast::ty_port(t) {
         word(s.s, "port<");
         print_type(s, t);
@@ -506,7 +506,7 @@ fn print_outer_attributes(s: ps, attrs: [ast::attribute]) {
     let count = 0;
     for attr: ast::attribute in attrs {
         alt attr.node.style {
-          ast::attr_outer. { print_attribute(s, attr); count += 1; }
+          ast::attr_outer { print_attribute(s, attr); count += 1; }
           _ {/* fallthrough */ }
         }
     }
@@ -517,7 +517,7 @@ fn print_inner_attributes(s: ps, attrs: [ast::attribute]) {
     let count = 0;
     for attr: ast::attribute in attrs {
         alt attr.node.style {
-          ast::attr_inner. {
+          ast::attr_inner {
             print_attribute(s, attr);
             word(s.s, ";");
             count += 1;
@@ -576,9 +576,9 @@ fn print_possibly_embedded_block(s: ps, blk: ast::blk, embedded: embed_type,
 fn print_possibly_embedded_block_(s: ps, blk: ast::blk, embedded: embed_type,
                                   indented: uint, attrs: [ast::attribute]) {
     alt blk.node.rules {
-      ast::unchecked_blk. { word(s.s, "unchecked"); }
-      ast::unsafe_blk. { word(s.s, "unsafe"); }
-      ast::default_blk. { }
+      ast::unchecked_blk { word(s.s, "unchecked"); }
+      ast::unsafe_blk { word(s.s, "unsafe"); }
+      ast::default_blk { }
     }
 
     maybe_print_comment(s, blk.span.lo);
@@ -950,8 +950,8 @@ fn print_opt(s: ps, expr: option::t<@ast::expr>) {
       }
       ast::expr_check(m, expr) {
         alt m {
-          ast::claimed_expr. { word_nbsp(s, "claim"); }
-          ast::checked_expr. { word_nbsp(s, "check"); }
+          ast::claimed_expr { word_nbsp(s, "claim"); }
+          ast::checked_expr { word_nbsp(s, "check"); }
         }
         popen(s);
         print_expr(s, expr);
@@ -989,7 +989,7 @@ fn print_expr_parens_if_not_bot(s: ps, ex: @ast::expr) {
 fn print_local_decl(s: ps, loc: @ast::local) {
     print_pat(s, loc.node.pat);
     alt loc.node.ty.node {
-      ast::ty_infer. { }
+      ast::ty_infer { }
       _ { word_space(s, ":"); print_type(s, loc.node.ty); }
     }
 }
@@ -1072,7 +1072,7 @@ fn print_pat(s: ps, &&pat: @ast::pat) {
             popen(s);
             commasep(s, inconsistent, args, print_pat);
             pclose(s);
-        } else { word(s.s, "."); }  // FIXME
+        } else { }
       }
       ast::pat_rec(fields, etc) {
         word(s.s, "{");
@@ -1479,13 +1479,13 @@ fn maybe_print_comment(s: ps, pos: uint) {
 
 fn print_comment(s: ps, cmnt: lexer::cmnt) {
     alt cmnt.style {
-      lexer::mixed. {
+      lexer::mixed {
         assert (vec::len(cmnt.lines) == 1u);
         zerobreak(s.s);
         word(s.s, cmnt.lines[0]);
         zerobreak(s.s);
       }
-      lexer::isolated. {
+      lexer::isolated {
         pprust::hardbreak_if_not_bol(s);
         for line: str in cmnt.lines {
             // Don't print empty lines because they will end up as trailing
@@ -1494,7 +1494,7 @@ fn print_comment(s: ps, cmnt: lexer::cmnt) {
             hardbreak(s.s);
         }
       }
-      lexer::trailing. {
+      lexer::trailing {
         word(s.s, " ");
         if vec::len(cmnt.lines) == 1u {
             word(s.s, cmnt.lines[0]);
index 093b9c49a7426630bbf8fca550962344a3c42a3e..11ccd1cc71f29c7bbe13e577f5a2d83e6e1871f2 100644 (file)
@@ -47,7 +47,7 @@ fn fn_to_str(cx: ctxt, proto: ast::proto, ident: option::t<ast::ident>,
             s += " -> ";
             alt cf {
               ast::noreturn { s += "!"; }
-              ast::return_val. { s += ty_to_str(cx, output); }
+              ast::return_val { s += ty_to_str(cx, output); }
             }
         }
         s += constrs_str(constrs);
index be00d8153e6bc00fddf222bf29a587d8b6731286..f40a1a77964a9954c2866104ef2003e843ad599d 100644 (file)
@@ -165,7 +165,7 @@ fn safe_to_replace_expr(e: ast::expr_, _tm: test_mode) -> bool {
 
 fn safe_to_replace_ty(t: ast::ty_, _tm: test_mode) -> bool {
     alt t {
-      ast::ty_infer. { false } // always implicit, always top level
+      ast::ty_infer { false } // always implicit, always top level
       ast::ty_bot { false }   // in source, can only appear as the out type of a function
       ast::ty_mac(_) { false }
       _ { true }
index 33ff630e708b170d2dea29fce0c2e7e8b0fa4de9..1868c79e97bfd8644a4180a99187fdfef5f66488 100644 (file)
@@ -451,7 +451,7 @@ fn filter_map<T: copy, U: copy>(v: [const T], f: block(T) -> option::t<U>)
     let result = [];
     for elem: T in v {
         alt f(copy elem) {
-          none. {/* no-op */ }
+          none {/* no-op */ }
           some(result_elem) { result += [result_elem]; }
         }
     }
index 965d8f1eaff85e08c8bb8b1f7f1dcd8d86e89432..0dc31f11ab0e1189b252a357b73ba1f038a2e688 100644 (file)
@@ -97,8 +97,8 @@ fn fclose(file: libc::FILE) {
 
 fn fsync_fd(fd: fd_t, level: io::fsync::level) -> c_int {
     alt level {
-      io::fsync::fsync. | io::fsync::fullfsync. { ret libc::fsync(fd); }
-      io::fsync::fdatasync. { ret libc::fdatasync(fd); }
+      io::fsync::fsync | io::fsync::fullfsync { ret libc::fsync(fd); }
+      io::fsync::fdatasync { ret libc::fdatasync(fd); }
     }
 }
 
index 5ae33adcc1bb89f6e316078827734fc524abe0ca..ad042b06c25855a43a1566bcd6b504ac1f9b5fac 100644 (file)
@@ -100,7 +100,7 @@ fn waitpid(pid: pid_t) -> i32 {
 
 fn fsync_fd(fd: fd_t, level: io::fsync::level) -> c_int {
     alt level {
-      io::fsync::fsync. { ret libc::fsync(fd); }
+      io::fsync::fsync { ret libc::fsync(fd); }
       _ {
         // According to man fnctl, the ok retval is only specified to be !=-1
         if (libc::fcntl(libc_constants::F_FULLFSYNC, fd) == -1 as c_int)
index ee3d8abb8f3c6ba114b10288a1ae53fb50cbd617..ac42820bf70fd183bb5ba3e9ff1ce8e4e8f3d7dd 100644 (file)
@@ -155,7 +155,7 @@ fn merge_arg_attrs(
                 none { doc }
             }
         }
-        // FIXME: Warning when documenting a non-existant arg
+        // FIXME: Warning when documenting a non-existent arg
     }
 
     fn merge_ret_attrs(
index 9c068c6c747a3171ed949c5b020a484cfb299b28..7665cf307378c2c9341e7aae15660e669e1eb9d5 100644 (file)
@@ -23,7 +23,7 @@ fn show(b: bottle) {
         #debug("Take one down and pass it around, \
                 no more bottles of beer on the wall.");
       }
-      dual. {
+      dual {
         #debug("2 bottles of beer on the wall, 2 bottles of beer,");
         #debug("Take one down and pass it around, \
                 1 bottle of beer on the wall.");
@@ -40,7 +40,7 @@ fn next(b: bottle) -> bottle {
     alt b {
       none { ret none; }
       single { ret none; }
-      dual. { ret single; }
+      dual { ret single; }
       multiple(3) { ret dual; }
       multiple(n) { ret multiple(n - 1); }
     }
index 02adfd610b08de92767dc4de3e31c2cdbd4d2e1d..e10a7fe7301b2035f05a13c41f023c8d933c345b 100644 (file)
@@ -116,8 +116,8 @@ fn get(p: port<reduce_proto>, state: @{mutable ref_count: int,
                     // #error("all done");
                     state.is_done = true;
                   }
-                  ref. { state.ref_count += 1; }
-                  release. { state.ref_count -= 1; }
+                  ref { state.ref_count += 1; }
+                  release { state.ref_count -= 1; }
                 }
             }
             ret none;
index 3951a51e9c04e9d3dc0dd56ffdb0da8a62b06aaa..8d1e80b77ae8bfcb13aa0cf6c0f76a3d79df98fa 100644 (file)
@@ -3,5 +3,5 @@
 tag a { A; }
 tag b { B; }
 
-fn main() { let x: a = A; alt x { B. { } } }
+fn main() { let x: a = A; alt x { B { } } }
 
index 8b39450be866dd62d4a405eb47351db750dc4518..dcca16590a57499924e02b1eda23d2a9c9868f67 100644 (file)
@@ -4,6 +4,6 @@ fn foo(s: str) { }
 
 fn main() {
     let i =
-        alt some::<int>(3) { none::<int>. { fail } some::<int>(_) { fail } };
+        alt some::<int>(3) { none::<int> { fail } some::<int>(_) { fail } };
     foo(i);
 }
index 4afd83c1b97e509e6050f0b2d32705ddea6e7239..829477ce71a8374eb565939cd27eb7a3748a0501 100644 (file)
@@ -6,4 +6,4 @@
 // error-pattern:non-exhaustive match failure
 tag t { a; b; }
 
-fn main() { let x = a; alt x { b. { } } }
+fn main() { let x = a; alt x { b { } } }
index e1ed1ac6c0b016018573ad9548a105a81e5f6789..687cf30f97fe95676ef73fc59405b3d4fc9d37c9 100644 (file)
@@ -12,7 +12,7 @@ fn foo<T>(y: option::t<T>) {
        entire if expression */
 
     if true {
-    } else { alt y { none::<T>. { x = 17; } _ { x = 42; } } rs += [x]; }
+    } else { alt y { none::<T> { x = 17; } _ { x = 42; } } rs += [x]; }
     ret;
 }
 
index 84d79220f9098b59603678e0323d4da69a85da21..bc2d3463959eb41ee9bb4453a6a68d29bb791586 100644 (file)
@@ -4,6 +4,6 @@ mod m1 {
     tag foo { foo1; foo2; }
 }
 
-fn bar(x: m1::foo) { alt x { m1::foo1. { } } }
+fn bar(x: m1::foo) { alt x { m1::foo1 { } } }
 
 fn main() { }
index 1cd5aa85758a3dfe42686592249ab5cd00ecf8da..e9c94962452b460e5f273a993176d02c3548be5c 100644 (file)
@@ -1,7 +1,7 @@
 tag maybe<T> { nothing; just(T); }
 
 fn foo(x: maybe<int>) {
-    alt x { nothing. { #error("A"); } just(a) { #error("B"); } }
+    alt x { nothing { #error("A"); } just(a) { #error("B"); } }
 }
 
 fn main() { }
index 34f2e5410a406b992a153639c96a9bf195002b11..67b4a9b6a128e97297f2733eabd4c36ae29f1d5b 100644 (file)
@@ -7,8 +7,8 @@
 fn main() {
     let x = true;
     alt a {
-      a. { x = true; foo {|_i|} }
-      b. { x = false; }
-      c. { x = false; }
+      a { x = true; foo {|_i|} }
+      b { x = false; }
+      c { x = false; }
     }
 }
index e51263db8042e6d3f223332e5c73e27af2d1c6c9..884a4da8a3d81731876ffb6dd5481c0444d609bc 100644 (file)
@@ -7,7 +7,7 @@ fn main() {
 
 
     alt tag1("test") {
-      tag2. { fail; }
+      tag2 { fail; }
       tag1("not-test") { fail; }
       tag1("test") { }
       _ { fail; }
index 8ff6b4bab27f778d5b44637a9544084693dcf842..cbdadda8e88104f1dad99bdd628f59248a20ce4f 100644 (file)
@@ -49,7 +49,7 @@ fn main() {
     while true {
         let msg = recv(p);
         alt msg {
-          closed. { #debug("Got close message"); break; }
+          closed { #debug("Got close message"); break; }
           received(data) {
             #debug("Got data. Length is:");
             log(debug, vec::len::<u8>(data));
index 09481d7e08438bc6ccd29a3133bd54e808bb24d3..29ffe6e4bc0ff6e8e9037ebaee21d7cd354c0b0e 100644 (file)
@@ -5,10 +5,10 @@ fn foo() {
     alt some::<int>(5) {
       some::<int>(x) {
         let bar;
-        alt none::<int> { none::<int>. { bar = 5; } _ { baz(); } }
+        alt none::<int> { none::<int> { bar = 5; } _ { baz(); } }
         log(debug, bar);
       }
-      none::<int>. { #debug("hello"); }
+      none::<int> { #debug("hello"); }
     }
 }
 
index 8d4609f95d06e8e73f2a12d51e169434139445fc..661d5cc7a3886524a68135860f1acbdd33d470be 100644 (file)
@@ -1,7 +1,7 @@
 tag blah { a; b; }
 
 fn or_alt(q: blah) -> int {
-  alt q { a. | b. { 42 } }
+  alt q { a | b { 42 } }
 }
 
 fn main() {
index 9aa6694892d104f4b0733473693699bc50049f86..cc86fbd3e8bd3a3b3e72e10822c48112cb67f3af 100644 (file)
@@ -1,7 +1,7 @@
 tag blah { a(int, int, uint); b(int, int); c; }
 
 fn or_alt(q: blah) -> int {
-    alt q { a(x, y, _) | b(x, y) { ret x + y; } c. { ret 0; } }
+    alt q { a(x, y, _) | b(x, y) { ret x + y; } c { ret 0; } }
 }
 
 fn main() {
index 3b0776fcd55f591f761938d10c1a2d7c2f9660ad..fd499bddd8f67ab33564945852b77424bad6517e 100644 (file)
@@ -4,5 +4,5 @@
 
 fn main() {
     let x = none::<int>;
-    alt x { none::<int>. { #debug("hello world"); } }
+    alt x { none::<int> { #debug("hello world"); } }
 }
index d0c4a2f270b9a679495fdd9c78ff68a09a8c9a64..34b2ce242ca2c8cc5f83d887c300014fc6aded14 100644 (file)
@@ -7,7 +7,7 @@
 fn uhoh<T>(v: [clam<T>]) {
     alt v[1] {
       a::<T>(t, u) { #debug("incorrect"); log(debug, u); fail; }
-      b::<T>. { #debug("correct"); }
+      b::<T> { #debug("correct"); }
     }
 }
 
index 1efe40d547ddc6ce7008e9b450bafacefa53050a..588b4107f130ce7f816d17663b56e7df12b5b374 100644 (file)
@@ -26,12 +26,12 @@ fn test_color(color: color, val: int, name: str) unsafe {
 
 fn get_color_alt(color: color) -> str {
     alt color {
-      red. {"red"}
-      green. {"green"}
-      blue. {"blue"}
-      black. {"black"}
-      white. {"white"}
-      imaginary. {"imaginary"}
+      red {"red"}
+      green {"green"}
+      blue {"blue"}
+      black {"black"}
+      white {"white"}
+      imaginary {"imaginary"}
       _ {"unknown"}
     }
 }
index 5e77cf8f684677fc58c06c308fa27951adc8ef2a..8b273543549599394ae3af9b1b8d7b0812f3bde7 100644 (file)
@@ -2,7 +2,7 @@
 
 fn foo<T>(o: myoption<T>) -> int {
     let x: int = 5;
-    alt o { none::<T>. { } some::<T>(t) { x += 1; } }
+    alt o { none::<T> { } some::<T>(t) { x += 1; } }
     ret x;
 }
 
index cd54239ec563572ea699d934032bc0d4a0c959d4..cccb1ac14d77103d5d9baee0c053e1b23dda3591 100644 (file)
@@ -2,7 +2,7 @@
 
 fn foo<T>(o: myoption<T>) -> int {
     let x: int;
-    alt o { none::<T>. { fail; } some::<T>(t) { x = 5; } }
+    alt o { none::<T> { fail; } some::<T>(t) { x = 5; } }
     ret x;
 }