about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-01-09 16:12:37 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-01-09 16:12:48 -0800
commit8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7 (patch)
treed326dd79d45136f7cd2960491e89607d671172e5 /src/test/compile-fail
parentf6ecbe88ca67769ccb9def337ada9ae25235e00e (diff)
downloadrust-8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7.tar.gz
rust-8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7.zip
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs4
-rw-r--r--src/test/compile-fail/cap-clause-illegal-cap.rs6
-rw-r--r--src/test/compile-fail/fn-expr-type-state.rs2
-rw-r--r--src/test/compile-fail/lambda-mutate-nested.rs6
-rw-r--r--src/test/compile-fail/lambda-mutate.rs4
-rw-r--r--src/test/compile-fail/sendfn-is-not-a-lambda.rs4
6 files changed, 13 insertions, 13 deletions
diff --git a/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs b/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs
index d5a0042d107..a7348b26fa2 100644
--- a/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs
+++ b/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs
@@ -1,10 +1,10 @@
 // error-pattern: copying a noncopyable value
 
-fn to_lambda1(f: lambda(uint) -> uint) -> lambda(uint) -> uint {
+fn to_lambda1(f: fn@(uint) -> uint) -> fn@(uint) -> uint {
     ret f;
 }
 
-fn to_lambda2(b: block(uint) -> uint) -> lambda(uint) -> uint {
+fn to_lambda2(b: block(uint) -> uint) -> fn@(uint) -> uint {
     ret to_lambda1({|x| b(x)});
 }
 
diff --git a/src/test/compile-fail/cap-clause-illegal-cap.rs b/src/test/compile-fail/cap-clause-illegal-cap.rs
index e2f60dbb6ab..6f4972fdf66 100644
--- a/src/test/compile-fail/cap-clause-illegal-cap.rs
+++ b/src/test/compile-fail/cap-clause-illegal-cap.rs
@@ -1,9 +1,9 @@
 // error-pattern: copying a noncopyable value
 
-fn to_lambda2(b: block(uint) -> uint) -> lambda(uint) -> uint {
+fn to_lambda2(b: block(uint) -> uint) -> fn@(uint) -> uint {
     // test case where copy clause specifies a value that is not used
-    // in lambda body, but value is illegal to copy:
-    ret lambda[copy b](u: uint) -> uint { 22u };
+    // in fn@ body, but value is illegal to copy:
+    ret fn@[copy b](u: uint) -> uint { 22u };
 }
 
 fn main() {
diff --git a/src/test/compile-fail/fn-expr-type-state.rs b/src/test/compile-fail/fn-expr-type-state.rs
index 5eb7541a520..cd7800b3780 100644
--- a/src/test/compile-fail/fn-expr-type-state.rs
+++ b/src/test/compile-fail/fn-expr-type-state.rs
@@ -1,7 +1,7 @@
 // error-pattern:Unsatisfied precondition
 
 fn main() {
-    // Typestate should work even in a lambda. we should reject this program.
+    // Typestate should work even in a fn@. we should reject this program.
     let f = fn () -> int { let i: int; ret i; };
     log(error, f());
 }
diff --git a/src/test/compile-fail/lambda-mutate-nested.rs b/src/test/compile-fail/lambda-mutate-nested.rs
index 0a733687aa3..2117eeefe8b 100644
--- a/src/test/compile-fail/lambda-mutate-nested.rs
+++ b/src/test/compile-fail/lambda-mutate-nested.rs
@@ -1,11 +1,11 @@
 // error-pattern:assigning to upvar
-// Make sure that nesting a block within a lambda doesn't let us
-// mutate upvars from a lambda.
+// Make sure that nesting a block within a fn@ doesn't let us
+// mutate upvars from a fn@.
 fn f2(x: block()) { x(); }
 
 fn main() {
     let i = 0;
-    let ctr = lambda () -> int { f2({|| i = i + 1; }); ret i; };
+    let ctr = fn@ () -> int { f2({|| i = i + 1; }); ret i; };
     log(error, ctr());
     log(error, ctr());
     log(error, ctr());
diff --git a/src/test/compile-fail/lambda-mutate.rs b/src/test/compile-fail/lambda-mutate.rs
index 6ba1cfc5401..0c6d8b1e7c5 100644
--- a/src/test/compile-fail/lambda-mutate.rs
+++ b/src/test/compile-fail/lambda-mutate.rs
@@ -1,8 +1,8 @@
 // error-pattern:assigning to upvar
-// Make sure we can't write to upvars from lambdas
+// Make sure we can't write to upvars from fn@s
 fn main() {
     let i = 0;
-    let ctr = lambda () -> int { i = i + 1; ret i; };
+    let ctr = fn@ () -> int { i = i + 1; ret i; };
     log(error, ctr());
     log(error, ctr());
     log(error, ctr());
diff --git a/src/test/compile-fail/sendfn-is-not-a-lambda.rs b/src/test/compile-fail/sendfn-is-not-a-lambda.rs
index 0eb787761f3..1be97b94654 100644
--- a/src/test/compile-fail/sendfn-is-not-a-lambda.rs
+++ b/src/test/compile-fail/sendfn-is-not-a-lambda.rs
@@ -1,6 +1,6 @@
-// error-pattern: mismatched types: expected `lambda(++uint) -> uint`
+// error-pattern: mismatched types: expected `fn@(++uint) -> uint`
 
-fn test(f: lambda(uint) -> uint) -> uint {
+fn test(f: fn@(uint) -> uint) -> uint {
     ret f(22u);
 }