Skip to content

Commit 5e81032

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163246 b: refs/heads/snap-stage3 c: 0fcd730 h: refs/heads/master v: v3
1 parent 3626f45 commit 5e81032

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f91d87e6a03f4e64034ee8fa073ac8d47e71dc88
4+
refs/heads/snap-stage3: 0fcd73037358b5f39276cf48f600299c44c7ccec
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustrt/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![feature(macro_rules, phase, globs, thread_local, asm)]
2020
#![feature(linkage, lang_items, unsafe_destructor, default_type_params)]
2121
#![feature(import_shadowing, slicing_syntax)]
22+
#![feature(unboxed_closures)]
2223
#![no_std]
2324
#![experimental]
2425

branches/snap-stage3/src/librustrt/task.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use core::atomic::{AtomicUint, SeqCst};
2222
use core::iter::{IteratorExt, Take};
2323
use core::kinds::marker;
2424
use core::mem;
25+
use core::ops::FnMut;
2526
use core::prelude::{Clone, Drop, Err, Iterator, None, Ok, Option, Send, Some};
2627
use core::prelude::{drop};
2728

@@ -297,9 +298,9 @@ impl Task {
297298
// `awoken` field which indicates whether we were actually woken up via some
298299
// invocation of `reawaken`. This flag is only ever accessed inside the
299300
// lock, so there's no need to make it atomic.
300-
pub fn deschedule(mut self: Box<Task>,
301-
times: uint,
302-
f: |BlockedTask| -> ::core::result::Result<(), BlockedTask>) {
301+
pub fn deschedule<F>(mut self: Box<Task>, times: uint, mut f: F) where
302+
F: FnMut(BlockedTask) -> ::core::result::Result<(), BlockedTask>,
303+
{
303304
unsafe {
304305
let me = &mut *self as *mut Task;
305306
let task = BlockedTask::block(self);

0 commit comments

Comments
 (0)