aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/expr-block-generic.rs
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-04-05 23:42:33 -0400
committerBrian Anderson <[email protected]>2011-04-07 21:58:36 -0400
commitd2d42fd4c746b10cffa4116ade9629340fdc4a5c (patch)
tree24ad8ee5b2bfb51da69e97d9c722c4773789444a /src/test/run-pass/expr-block-generic.rs
parentbuild: Use -O0 on Darwin. Seems that Darwin's GCC optimizations break rustrt. (diff)
downloadrust-d2d42fd4c746b10cffa4116ade9629340fdc4a5c.tar.xz
rust-d2d42fd4c746b10cffa4116ade9629340fdc4a5c.zip
Make block results work for generic types
I think just about every type can be used as a block result now. There's quite a proliferation of tests here, but they all test slightly different things and some are split out to remain XFAILed. The tests of generic vectors are still XFAILed because generic aliased boxes still don't work in general.
Diffstat (limited to 'src/test/run-pass/expr-block-generic.rs')
-rw-r--r--src/test/run-pass/expr-block-generic.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/run-pass/expr-block-generic.rs b/src/test/run-pass/expr-block-generic.rs
index fc34d112..ded3b620 100644
--- a/src/test/run-pass/expr-block-generic.rs
+++ b/src/test/run-pass/expr-block-generic.rs
@@ -1,5 +1,4 @@
// xfail-boot
-// xfail-stage0
// -*- rust -*-
// Tests for standalone blocks as expressions with dynamic type sizes
@@ -29,28 +28,9 @@ fn test_tup() {
test_generic[t](tup(1, 2), eq);
}
-fn test_vec() {
- fn compare_vec(&vec[int] v1, &vec[int] v2) -> bool {
- ret v1 == v2;
- }
- auto eq = bind compare_vec(_, _);
- test_generic[vec[int]](vec(1, 2), eq);
-}
-
-fn test_box() {
- fn compare_box(&@bool b1, &@bool b2) -> bool {
- ret *b1 == *b2;
- }
- auto eq = bind compare_box(_, _);
- test_generic[@bool](@true, eq);
-}
-
fn main() {
test_bool();
test_tup();
- // FIXME: These two don't pass yet
- test_vec();
- test_box();
}