File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
branches/snap-stage3/src/libstd Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 30e373390f1a2f74e78bf9ca9c8ca68451f3511a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 2b2d1e14c97b7692debf62dd2739049f1f377a5e
4
+ refs/heads/snap-stage3: b4ecbe93401a56181baaffc4ff7e275aeecc5182
5
5
refs/heads/try: fa3000fae833e0869b11da51cabb2a2598ba86d1
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl Task {
109
109
/// This function is *not* meant to be abused as a "try/catch" block. This
110
110
/// is meant to be used at the absolute boundaries of a task's lifetime, and
111
111
/// only for that purpose.
112
- pub fn run ( ~self , f: ||) -> ~Task {
112
+ pub fn run ( ~self , mut f: ||) -> ~Task {
113
113
// Need to put ourselves into TLS, but also need access to the unwinder.
114
114
// Unsafely get a handle to the task so we can continue to use it after
115
115
// putting it in tls (so we can invoke the unwinder).
Original file line number Diff line number Diff line change @@ -35,19 +35,19 @@ use ops::Drop;
35
35
#[ cfg( test) ] use task:: failing;
36
36
37
37
pub trait Finally < T > {
38
- fn finally ( & self , dtor: ||) -> T ;
38
+ fn finally ( & mut self , dtor: ||) -> T ;
39
39
}
40
40
41
41
impl < ' a , T > Finally < T > for ||: ' a -> T {
42
- fn finally( & self , dtor: ||) -> T {
43
- try_finally ( & mut ( ) , ( ) ,
44
- |_, _ | ( * self ) ( ) ,
42
+ fn finally( & mut self , dtor: ||) -> T {
43
+ try_finally( & mut ( ) , self ,
44
+ |_, f | ( * f ) ( ) ,
45
45
|_| dtor ( ) )
46
46
}
47
47
}
48
48
49
49
impl <T > Finally < T > for fn ( ) -> T {
50
- fn finally ( & self , dtor: ||) -> T {
50
+ fn finally ( & mut self , dtor: ||) -> T {
51
51
try_finally ( & mut ( ) , ( ) ,
52
52
|_, _| ( * self ) ( ) ,
53
53
|_| dtor ( ) )
You can’t perform that action at this time.
0 commit comments