diff options
Diffstat (limited to 'src/libstd/task.rs')
| -rw-r--r-- | src/libstd/task.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs index c91417e611e..5a1a5b4fb7a 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -381,7 +381,9 @@ mod test { rx.recv(); } - fn avoid_copying_the_body(spawnfn: |v: proc():Send|) { + fn avoid_copying_the_body<F>(spawnfn: F) where + F: FnOnce(proc():Send), + { let (tx, rx) = channel::<uint>(); let x = box 1; |
