File tree 6 files changed +393
-213
lines changed 6 files changed +393
-213
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,7 @@ pub fn do_abort() -> ! {
49
49
macro_rules! abort(
50
50
( $( $msg: expr) ,+) => ( {
51
51
rtdebug!( $( $msg) ,+) ;
52
-
53
- // do_abort();
54
-
55
- // NB: This is in a fn to avoid putting the `unsafe` block in
56
- // a macro, which causes spurious 'unnecessary unsafe block'
57
- // warnings.
58
- // fn do_abort() -> ! {
59
- // unsafe { ::libc::abort(); }
60
- // }
61
-
62
52
:: macros:: do_abort( ) ;
63
-
64
53
} )
65
54
)
66
55
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl Local for Scheduler {
30
30
fn borrow < T > ( f : & fn ( & mut Scheduler ) -> T ) -> T {
31
31
let mut res: Option < T > = None ;
32
32
let res_ptr: * mut Option < T > = & mut res;
33
- unsafe {
33
+ unsafe {
34
34
do local_ptr:: borrow |sched| {
35
35
let result = f ( sched) ;
36
36
* res_ptr = Some ( result) ;
@@ -39,7 +39,7 @@ impl Local for Scheduler {
39
39
match res {
40
40
Some ( r) => { r }
41
41
None => abort ! ( "function failed!" )
42
- }
42
+ }
43
43
}
44
44
unsafe fn unsafe_borrow ( ) -> * mut Scheduler { local_ptr:: unsafe_borrow ( ) }
45
45
unsafe fn try_unsafe_borrow ( ) -> Option < * mut Scheduler > { abort ! ( "unimpl" ) }
@@ -139,5 +139,5 @@ mod test {
139
139
assert ! ( res)
140
140
let _scheduler: ~Scheduler = Local :: take ( ) ;
141
141
}
142
-
142
+
143
143
}
You can’t perform that action at this time.
0 commit comments