File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: deef212bf77e84ef35ef33b5725059bb4bf5d154
2
+ refs/heads/master: 87a782c0b3034d0833f677ffc1161ddfb4c6765d
Original file line number Diff line number Diff line change @@ -332,17 +332,13 @@ fn run_test(test: &test_desc, to_task: &test_to_task) -> test_future {
332
332
}
333
333
334
334
// We need to run our tests in another task in order to trap test failures.
335
- // But, at least currently, functions can't be used as spawn arguments so
336
- // we've got to treat our test functions as unsafe pointers. This function
337
- // only works with functions that don't contain closures.
335
+ // This function only works with functions that don't contain closures.
338
336
fn default_test_to_task( f: & fn ( ) ) -> task_id {
339
- fn run_task ( fptr : * mutable fn ( ) ) {
337
+ fn run_task ( f : fn ( ) ) {
340
338
configure_test_task ( ) ;
341
- // Run the test
342
- ( * fptr) ( )
339
+ f ( ) ;
343
340
}
344
- let fptr = ptr:: addr_of ( f) ;
345
- ret task:: spawn ( bind run_task ( fptr) ) ;
341
+ ret task:: spawn ( bind run_task ( f) ) ;
346
342
}
347
343
348
344
// Call from within a test task to make sure it's set up correctly
You can’t perform that action at this time.
0 commit comments