diff options
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/task.rs | 2 |
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 |
