diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-11 12:52:25 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-13 06:27:35 -0800 |
| commit | 3f3bfeec27c3457de30929d7dbf914a5b350808c (patch) | |
| tree | db38c6f0d28f66e58ecaee44713f7dba432dd15c /src/libstd | |
| parent | 455f8b0d4588b6d890ce8a908d488c0325e3f29e (diff) | |
make "native fn" the type for bare functions, remove fn exprs
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/test.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/test.rs b/src/libstd/test.rs index 7b9157f2afe..ef3c9a244bc 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -313,24 +313,24 @@ type test_future<T> = {test: test_desc<T>, wait: fn@() -> test_result}; fn run_test<T: copy>(test: test_desc<T>, to_task: test_to_task<T>) -> test_future<T> { if test.ignore { - ret {test: test, wait: fn () -> test_result { tr_ignored }}; + ret {test: test, wait: fn@() -> test_result { tr_ignored }}; } let test_task = to_task(test.fn); ret {test: test, - wait: - bind fn (test_task: joinable, should_fail: bool) -> test_result { - alt task::join(test_task) { - task::tr_success. { - if should_fail { tr_failed } - else { tr_ok } - } - task::tr_failure. { - if should_fail { tr_ok } - else { tr_failed } - } - } - }(test_task, test.should_fail)}; + wait: fn@() -> test_result { + alt task::join(test_task) { + task::tr_success. { + if test.should_fail { tr_failed } + else { tr_ok } + } + task::tr_failure. { + if test.should_fail { tr_ok } + else { tr_failed } + } + } + } + }; } // We need to run our tests in another task in order to trap test failures. |
