diff --git a/futures-core/src/future/future_obj.rs b/futures-core/src/future/future_obj.rs index 0f678ee4de..fe4dcf6cfc 100644 --- a/futures-core/src/future/future_obj.rs +++ b/futures-core/src/future/future_obj.rs @@ -19,6 +19,9 @@ pub struct LocalFutureObj<'a, T> { _marker: PhantomData<&'a ()>, } +// As LocalFutureObj only holds pointers, even if we move it, the pointed to values won't move, +// so this is safe as long as we don't provide any way for a user to directly access the pointers +// and move their values. impl Unpin for LocalFutureObj<'_, T> {} #[allow(single_use_lifetimes)]