diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-21 22:28:21 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-23 10:03:43 -0700 |
| commit | b4ecbe93401a56181baaffc4ff7e275aeecc5182 (patch) | |
| tree | 8dcae1c59342fc3de1954f500e74467c9d14f5fc /src/libstd/rt/task.rs | |
| parent | 2b2d1e14c97b7692debf62dd2739049f1f377a5e (diff) | |
| download | rust-b4ecbe93401a56181baaffc4ff7e275aeecc5182.tar.gz rust-b4ecbe93401a56181baaffc4ff7e275aeecc5182.zip | |
std: Change Finally to take `&mut self`
As with the previous commits, the Finally trait is primarily implemented for closures, so the trait was modified from `&self` to `&mut self`. This will require that any closure variable invoked with `finally` to be stored in a mutable slot. [breaking-change]
Diffstat (limited to 'src/libstd/rt/task.rs')
| -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 f75b5315207..2dab0e975da 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -109,7 +109,7 @@ impl Task { /// This function is *not* meant to be abused as a "try/catch" block. This /// is meant to be used at the absolute boundaries of a task's lifetime, and /// only for that purpose. - pub fn run(~self, f: ||) -> ~Task { + pub fn run(~self, mut f: ||) -> ~Task { // Need to put ourselves into TLS, but also need access to the unwinder. // Unsafely get a handle to the task so we can continue to use it after // putting it in tls (so we can invoke the unwinder). |
