diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-08-20 14:55:54 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-08-27 18:47:58 -0700 |
| commit | d9bb78efdf2fbb0de9ca43a8b14e5c91c78164e9 (patch) | |
| tree | e0466313c65afc02f8594fc6ab2404faf003431d /src/libstd/rt/borrowck.rs | |
| parent | 4f32a2d8540cc7534270be3a0aa33b830534a67b (diff) | |
librustc: Stop calling `each_path` in coherence.
10% win or so for small crates.
Diffstat (limited to 'src/libstd/rt/borrowck.rs')
| -rw-r--r-- | src/libstd/rt/borrowck.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rt/borrowck.rs b/src/libstd/rt/borrowck.rs index e03a61226ad..9dc0abdfbd8 100644 --- a/src/libstd/rt/borrowck.rs +++ b/src/libstd/rt/borrowck.rs @@ -38,7 +38,7 @@ pub struct BorrowRecord { } fn try_take_task_borrow_list() -> Option<~[BorrowRecord]> { - do Local::borrow::<Task, Option<~[BorrowRecord]>> |task| { + do Local::borrow |task: &mut Task| { task.borrow_list.take() } } @@ -50,7 +50,7 @@ fn swap_task_borrow_list(f: &fn(~[BorrowRecord]) -> ~[BorrowRecord]) { }; let borrows = f(borrows); let borrows = Cell::new(borrows); - do Local::borrow::<Task, ()> |task| { + do Local::borrow |task: &mut Task| { task.borrow_list = Some(borrows.take()); } } |
