Skip to content

Commit cdc0fc4

Browse files
committed
Update core wrapper for pin stabilization
1 parent 3e498ee commit cdc0fc4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(futures_api)]
22
#![feature(optin_builtin_traits)]
33
#![feature(generator_trait)]
4-
#![feature(pin)]
54
#![feature(arbitrary_self_types)]
65
#![no_std]
76

@@ -12,7 +11,7 @@ pub mod future {
1211

1312
use core::{
1413
ops::{Generator, GeneratorState},
15-
pin::{Pin, Unpin},
14+
pin::Pin,
1615
ptr,
1716
sync::atomic::{AtomicPtr, Ordering},
1817
task::{LocalWaker, Poll},
@@ -39,7 +38,7 @@ pub mod future {
3938
type Output = T::Return;
4039
fn poll(self: Pin<&mut Self>, lw: &LocalWaker) -> Poll<Self::Output> {
4140
set_task_waker(lw, || {
42-
match unsafe { Pin::get_mut_unchecked(self).0.resume() } {
41+
match unsafe { Pin::get_unchecked_mut(self).0.resume() } {
4342
GeneratorState::Yielded(()) => Poll::Pending,
4443
GeneratorState::Complete(x) => Poll::Ready(x),
4544
}

0 commit comments

Comments
 (0)