]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #51532 - MajorBreakfast:task-future, r=cramertj
authorbors <bors@rust-lang.org>
Wed, 13 Jun 2018 20:44:17 +0000 (20:44 +0000)
committerbors <bors@rust-lang.org>
Wed, 13 Jun 2018 20:44:17 +0000 (20:44 +0000)
Improve core::task::TaskObj

- Rename `UnsafePoll` to `UnsafeTask` to avoid confusion with `Poll`
- Rename `TaskObj::from_poll_task()` to `TaskObj::new()`
- Rename `TaskObj`'s `poll` and `drop` fields to `poll_fn` and `drop_fn`
- Implement `Future` for `TaskObj`. Reason: It's a custom trait object for a future, so it should implement future
- Remove `unsafe impl Sync` for `TaskObj`. I don't think we need it. Was this safe? `UnsafeTask` only requires to implement `Send`

@cramertj
@aturon


Trivial merge