···1212//! unsoundness if a ScopedFuture internally registers the waker with something
1313//! that expects it to live for 'scope, and then the ScopedFutureWrapper is
1414//! dropped
1515+//!
1616+//!
1717+//! ## TRIGGER WARNING
1818+//!
1919+//! This code is not for the faint of heart. Read at your own risk.
15201616-use crate::{ScopedFuture, Wake};
1721use std::{
1822 cell::UnsafeCell,
1923 marker::PhantomData,
···2125 pin::Pin,
2226 task::{Context, Poll, Waker},
2327};
2828+2929+use futures_core::{ScopedFuture, Wake};
24302531/// RawWaker: fat ptr (*const (), &'static RawWakerVTable)
2632/// &'scope dyn Wake fat ptr: (&'scope (), &'scope WakeVTable)
···142148 }
143149 }
144150}
151151+152152+fn test(a: &i32) -> impl ScopedFuture<'_> + '_ {
153153+ async fn inner(a: &i32) -> i32 {
154154+ a + 1
155155+ }
156156+157157+ let x = inner(a);
158158+159159+ unsafe { UnscopedFutureWrapper::from_future(inner(a)) }
160160+}
-1
futures-core/src/lib.rs
···11use std::task::Poll;
2233-mod compat;
43mod task;
5465pub use crate::task::Wake;