diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/child-outlives-parent.rs | 8 | ||||
| -rw-r--r-- | src/test/run-pass/constrained-type.rs | 14 |
2 files changed, 22 insertions, 0 deletions
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() { +} |