提交 3dcb79da 编写于 作者: B Brian Anderson 提交者: Graydon Hoare

Add a regression test for channels of nil, which happens to work in rustc, but not in rustboot

上级 c02cdc32
...@@ -501,6 +501,7 @@ TASK_XFAILS := $(addprefix $(S)src/test/run-pass/, \ ...@@ -501,6 +501,7 @@ TASK_XFAILS := $(addprefix $(S)src/test/run-pass/, \
task-comm-12.rs \ task-comm-12.rs \
task-comm-2.rs \ task-comm-2.rs \
task-comm-9.rs \ task-comm-9.rs \
task-comm-chan-nil.rs \
task-life-0.rs \ task-life-0.rs \
alt-type-simple.rs \ alt-type-simple.rs \
many.rs) many.rs)
......
...@@ -434,6 +434,7 @@ TASK_XFAILS := test/run-pass/task-comm-8.rs \ ...@@ -434,6 +434,7 @@ TASK_XFAILS := test/run-pass/task-comm-8.rs \
test/run-pass/task-comm-12.rs \ test/run-pass/task-comm-12.rs \
test/run-pass/task-comm-2.rs \ test/run-pass/task-comm-2.rs \
test/run-pass/task-comm-9.rs \ test/run-pass/task-comm-9.rs \
test/run-pass/task-comm-chan-nil.rs \
test/run-pass/task-life-0.rs \ test/run-pass/task-life-0.rs \
test/run-pass/alt-type-simple.rs \ test/run-pass/alt-type-simple.rs \
test/run-pass/many.rs test/run-pass/many.rs
......
// -*- rust -*-
// rustboot can't transmit nils across channels because they don't have
// any size, but rustc currently can because they do have size. Whether
// or not this is desirable I don't know, but here's a regression test.
impure fn main() {
let port[()] po = port();
let chan[()] ch = chan(po);
ch <| ();
let () n;
n <- po;
check (n == ());
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册