about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2014-12-30 18:05:17 -0500
committerJorge Aparicio <japaricious@gmail.com>2014-12-31 22:50:25 -0500
commit371f04d4330f70cfab5fa2a5fdb65df7ccd0604c (patch)
tree501d58736b4db70155b452b58d39fc658721ef6f /src/libstd/rt
parenta17c2b60e1c32e950b011296025a9f88f4d3c4e4 (diff)
downloadrust-371f04d4330f70cfab5fa2a5fdb65df7ccd0604c.tar.gz
rust-371f04d4330f70cfab5fa2a5fdb65df7ccd0604c.zip
std: unbox closures used in function arguments
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/task.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index 773322e4f57..41e91d1b6ef 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -174,7 +174,7 @@ impl Task {
     ///
     /// It is invalid to call this function with a thread that has been previously
     /// destroyed via a failed call to `run`.
-    pub fn run(mut self: Box<Task>, f: ||) -> Box<Task> {
+    pub fn run<F>(mut self: Box<Task>, f: F) -> Box<Task> where F: FnOnce() {
         assert!(!self.is_destroyed(), "cannot re-use a destroyed thread");
 
         // First, make sure that no one else is in TLS. This does not allow