aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile6
-rw-r--r--src/boot/fe/pexp.ml2
-rw-r--r--src/test/run-pass/child-outlives-parent.rs8
-rw-r--r--src/test/run-pass/constrained-type.rs14
4 files changed, 28 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index a5e97152..3d31fad3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -381,11 +381,13 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
test/run-pass/task-comm-9.rs \
test/run-pass/task-comm.rs \
test/run-pass/threads.rs \
- test/run-pass/yield.rs
+ test/run-pass/yield.rs
TEST_XFAILS_X86 := $(TASK_XFAILS) \
test/run-pass/bind-obj-ctor.rs \
+ test/run-pass/child-outlives-parent.rs \
test/run-pass/clone-with-exterior.rs \
+ test/run-pass/constrained-type.rs \
test/run-pass/obj-as.rs \
test/run-pass/vec-slice.rs \
test/run-pass/fn-lval.rs \
@@ -424,10 +426,12 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
box-in-tup.rs \
box-unbox.rs \
cast.rs \
+ child-outlives-parent.rs \
clone-with-exterior.rs \
comm.rs \
command-line-args.rs \
complex.rs \
+ constrained-type.rs \
deep.rs \
deref.rs \
destructor-ordering.rs \
diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml
index 1532a47a..9b870639 100644
--- a/src/boot/fe/pexp.ml
+++ b/src/boot/fe/pexp.ml
@@ -121,7 +121,7 @@ and parse_carg_base (ps:pstate) : Ast.carg_base =
and parse_carg (ps:pstate) : Ast.carg =
match peek ps with
- IDENT _ ->
+ IDENT _ | STAR ->
begin
let base = Ast.CARG_base (parse_carg_base ps) in
let path =
diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs
new file mode 100644
index 00000000..d7d7c344
--- /dev/null
+++ b/src/test/run-pass/child-outlives-parent.rs
@@ -0,0 +1,8 @@
+// Reported as issue #126, child leaks the string.
+
+fn child2(str s) {
+}
+
+fn main() {
+ auto x = spawn child2("hi");
+} \ No newline at end of file
diff --git a/src/test/run-pass/constrained-type.rs b/src/test/run-pass/constrained-type.rs
new file mode 100644
index 00000000..88a39ec8
--- /dev/null
+++ b/src/test/run-pass/constrained-type.rs
@@ -0,0 +1,14 @@
+// -*- rust -*-
+
+// Reported as issue #141, as a parse error. Ought to work in full though.
+
+type list = tag(cons(int,@list), nil());
+type bubu = rec(int x, int y);
+
+
+fn less_than(int x, int y) -> bool { ret x < y; }
+
+type ordered_range = rec(int low, int high) : less_than(*.low, *.high);
+
+fn main() {
+}