Add tests for moving nullary functions
I believe this was fixed by marijn recently. Closes #922
This commit is contained in:
parent
91d8e69621
commit
107f1292eb
8
src/test/run-pass/move-nullary-fn.rs
Normal file
8
src/test/run-pass/move-nullary-fn.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// Issue #922
|
||||
fn f2(-thing: fn()) { }
|
||||
|
||||
fn f(-thing: fn()) { f2(thing); }
|
||||
|
||||
fn main() {
|
||||
f(fn(){});
|
||||
}
|
11
src/test/run-pass/task-comm-17.rs
Normal file
11
src/test/run-pass/task-comm-17.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// Issue #922
|
||||
|
||||
use std;
|
||||
import std::task;
|
||||
|
||||
fn f() {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
task::spawn(bind f());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user