diff options
| author | bors <bors@rust-lang.org> | 2018-09-23 10:09:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-23 10:09:22 +0000 |
| commit | 2287a7a6e293cfcb3bbbdaf3ce2dca5dd2d3184a (patch) | |
| tree | 34343382fd1ed94d646423f0c2106df0ce33d0ab /src/libstd/panic.rs | |
| parent | 317ae05a7e4ee5324cc006eda877eb8f2eb57898 (diff) | |
| parent | 1b00f0b9fa92daa489510b8718ce56130420795f (diff) | |
| download | rust-2287a7a6e293cfcb3bbbdaf3ce2dca5dd2d3184a.tar.gz rust-2287a7a6e293cfcb3bbbdaf3ce2dca5dd2d3184a.zip | |
Auto merge of #54339 - cramertj:no-cx, r=aturon
Remove spawning from task::Context r? @aturon cc https://github.com/rust-lang-nursery/wg-net/issues/56
Diffstat (limited to 'src/libstd/panic.rs')
| -rw-r--r-- | src/libstd/panic.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index bd7a92e9b3f..48a9b2f4a93 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -22,7 +22,7 @@ use panicking; use ptr::{Unique, NonNull}; use rc::Rc; use sync::{Arc, Mutex, RwLock, atomic}; -use task::{self, Poll}; +use task::{LocalWaker, Poll}; use thread::Result; #[stable(feature = "panic_hooks", since = "1.10.0")] @@ -327,9 +327,9 @@ impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> { impl<'a, F: Future> Future for AssertUnwindSafe<F> { type Output = F::Output; - fn poll(self: Pin<&mut Self>, cx: &mut task::Context) -> Poll<Self::Output> { + fn poll(self: Pin<&mut Self>, lw: &LocalWaker) -> Poll<Self::Output> { let pinned_field = unsafe { Pin::map_unchecked_mut(self, |x| &mut x.0) }; - F::poll(pinned_field, cx) + F::poll(pinned_field, lw) } } |
