From d2d42fd4c746b10cffa4116ade9629340fdc4a5c Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 5 Apr 2011 23:42:33 -0400 Subject: 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. --- src/test/run-pass/expr-block-generic.rs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/test/run-pass/expr-block-generic.rs') 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(); } -- cgit v1.2.3