about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-01-19 01:03:57 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-01-19 01:04:59 -0800
commit5b028f527f2c487a5f4196fdf3cfc7a2acef74ff (patch)
tree5888a216866e8d94d3211dbf39bb943d64d47017 /src/test
parent9df03068897602d4377a35c0ae3cf2467666a039 (diff)
downloadrust-5b028f527f2c487a5f4196fdf3cfc7a2acef74ff.tar.gz
rust-5b028f527f2c487a5f4196fdf3cfc7a2acef74ff.zip
Remove support for the '.' after a nullary tag in a pattern
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/99bob-pattern.rs4
-rw-r--r--src/test/bench/task-perf-word-count.rs4
-rw-r--r--src/test/compile-fail/alt-tag-nullary.rs2
-rw-r--r--src/test/run-fail/alt-bot-fail.rs2
-rw-r--r--src/test/run-fail/non-exhaustive-match.rs2
-rw-r--r--src/test/run-pass/alt-join.rs2
-rw-r--r--src/test/run-pass/alt-path.rs2
-rw-r--r--src/test/run-pass/alt-pattern-no-type-params.rs2
-rw-r--r--src/test/run-pass/alt-phi.rs6
-rw-r--r--src/test/run-pass/alt-str.rs2
-rw-r--r--src/test/run-pass/issue-687.rs2
-rw-r--r--src/test/run-pass/nested-alts.rs4
-rw-r--r--src/test/run-pass/nullary-or-pattern.rs2
-rw-r--r--src/test/run-pass/or-pattern.rs2
-rw-r--r--src/test/run-pass/simple-alt-generic-tag.rs2
-rw-r--r--src/test/run-pass/size-and-align.rs2
-rw-r--r--src/test/run-pass/tag-variant-disr-val.rs12
-rw-r--r--src/test/run-pass/use-uninit-alt.rs2
-rw-r--r--src/test/run-pass/use-uninit-alt2.rs2
19 files changed, 29 insertions, 29 deletions
diff --git a/src/test/bench/99bob-pattern.rs b/src/test/bench/99bob-pattern.rs
index 9c068c6c747..7665cf30737 100644
--- a/src/test/bench/99bob-pattern.rs
+++ b/src/test/bench/99bob-pattern.rs
@@ -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); }
     }
diff --git a/src/test/bench/task-perf-word-count.rs b/src/test/bench/task-perf-word-count.rs
index 02adfd610b0..e10a7fe7301 100644
--- a/src/test/bench/task-perf-word-count.rs
+++ b/src/test/bench/task-perf-word-count.rs
@@ -116,8 +116,8 @@ mod map_reduce {
                     // #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;
diff --git a/src/test/compile-fail/alt-tag-nullary.rs b/src/test/compile-fail/alt-tag-nullary.rs
index 3951a51e9c0..8d1e80b77ae 100644
--- a/src/test/compile-fail/alt-tag-nullary.rs
+++ b/src/test/compile-fail/alt-tag-nullary.rs
@@ -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 { } } }
 
diff --git a/src/test/run-fail/alt-bot-fail.rs b/src/test/run-fail/alt-bot-fail.rs
index 8b39450be86..dcca16590a5 100644
--- a/src/test/run-fail/alt-bot-fail.rs
+++ b/src/test/run-fail/alt-bot-fail.rs
@@ -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);
 }
diff --git a/src/test/run-fail/non-exhaustive-match.rs b/src/test/run-fail/non-exhaustive-match.rs
index 4afd83c1b97..829477ce71a 100644
--- a/src/test/run-fail/non-exhaustive-match.rs
+++ b/src/test/run-fail/non-exhaustive-match.rs
@@ -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 { } } }
diff --git a/src/test/run-pass/alt-join.rs b/src/test/run-pass/alt-join.rs
index e1ed1ac6c0b..687cf30f97f 100644
--- a/src/test/run-pass/alt-join.rs
+++ b/src/test/run-pass/alt-join.rs
@@ -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;
 }
 
diff --git a/src/test/run-pass/alt-path.rs b/src/test/run-pass/alt-path.rs
index 84d79220f90..bc2d3463959 100644
--- a/src/test/run-pass/alt-path.rs
+++ b/src/test/run-pass/alt-path.rs
@@ -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() { }
diff --git a/src/test/run-pass/alt-pattern-no-type-params.rs b/src/test/run-pass/alt-pattern-no-type-params.rs
index 1cd5aa85758..e9c94962452 100644
--- a/src/test/run-pass/alt-pattern-no-type-params.rs
+++ b/src/test/run-pass/alt-pattern-no-type-params.rs
@@ -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() { }
diff --git a/src/test/run-pass/alt-phi.rs b/src/test/run-pass/alt-phi.rs
index 34f2e5410a4..67b4a9b6a12 100644
--- a/src/test/run-pass/alt-phi.rs
+++ b/src/test/run-pass/alt-phi.rs
@@ -7,8 +7,8 @@ fn foo(it: block(int)) { it(10); }
 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; }
     }
 }
diff --git a/src/test/run-pass/alt-str.rs b/src/test/run-pass/alt-str.rs
index e51263db804..884a4da8a3d 100644
--- a/src/test/run-pass/alt-str.rs
+++ b/src/test/run-pass/alt-str.rs
@@ -7,7 +7,7 @@ fn main() {
 
 
     alt tag1("test") {
-      tag2. { fail; }
+      tag2 { fail; }
       tag1("not-test") { fail; }
       tag1("test") { }
       _ { fail; }
diff --git a/src/test/run-pass/issue-687.rs b/src/test/run-pass/issue-687.rs
index 8ff6b4bab27..cbdadda8e88 100644
--- a/src/test/run-pass/issue-687.rs
+++ b/src/test/run-pass/issue-687.rs
@@ -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));
diff --git a/src/test/run-pass/nested-alts.rs b/src/test/run-pass/nested-alts.rs
index 09481d7e084..29ffe6e4bc0 100644
--- a/src/test/run-pass/nested-alts.rs
+++ b/src/test/run-pass/nested-alts.rs
@@ -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"); }
     }
 }
 
diff --git a/src/test/run-pass/nullary-or-pattern.rs b/src/test/run-pass/nullary-or-pattern.rs
index 8d4609f95d0..661d5cc7a38 100644
--- a/src/test/run-pass/nullary-or-pattern.rs
+++ b/src/test/run-pass/nullary-or-pattern.rs
@@ -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() {
diff --git a/src/test/run-pass/or-pattern.rs b/src/test/run-pass/or-pattern.rs
index 9aa6694892d..cc86fbd3e8b 100644
--- a/src/test/run-pass/or-pattern.rs
+++ b/src/test/run-pass/or-pattern.rs
@@ -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() {
diff --git a/src/test/run-pass/simple-alt-generic-tag.rs b/src/test/run-pass/simple-alt-generic-tag.rs
index 3b0776fcd55..fd499bddd8f 100644
--- a/src/test/run-pass/simple-alt-generic-tag.rs
+++ b/src/test/run-pass/simple-alt-generic-tag.rs
@@ -4,5 +4,5 @@ tag opt<T> { none; }
 
 fn main() {
     let x = none::<int>;
-    alt x { none::<int>. { #debug("hello world"); } }
+    alt x { none::<int> { #debug("hello world"); } }
 }
diff --git a/src/test/run-pass/size-and-align.rs b/src/test/run-pass/size-and-align.rs
index d0c4a2f270b..34b2ce242ca 100644
--- a/src/test/run-pass/size-and-align.rs
+++ b/src/test/run-pass/size-and-align.rs
@@ -7,7 +7,7 @@ tag clam<T> { a(T, int); b; }
 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"); }
     }
 }
 
diff --git a/src/test/run-pass/tag-variant-disr-val.rs b/src/test/run-pass/tag-variant-disr-val.rs
index 1efe40d547d..588b4107f13 100644
--- a/src/test/run-pass/tag-variant-disr-val.rs
+++ b/src/test/run-pass/tag-variant-disr-val.rs
@@ -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"}
     }
 }
diff --git a/src/test/run-pass/use-uninit-alt.rs b/src/test/run-pass/use-uninit-alt.rs
index 5e77cf8f684..8b273543549 100644
--- a/src/test/run-pass/use-uninit-alt.rs
+++ b/src/test/run-pass/use-uninit-alt.rs
@@ -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;
 }
 
diff --git a/src/test/run-pass/use-uninit-alt2.rs b/src/test/run-pass/use-uninit-alt2.rs
index cd54239ec56..cccb1ac14d7 100644
--- a/src/test/run-pass/use-uninit-alt2.rs
+++ b/src/test/run-pass/use-uninit-alt2.rs
@@ -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;
 }