1 #![cfg(feature = "compat")] 2 3 //! Assert Send/Sync/Unpin for all public types. 4 5 use futures::{ 6 future::Future, 7 sink::Sink, 8 stream::Stream, 9 task::{Context, Poll}, 10 }; 11 use static_assertions::{assert_impl_all as assert_impl, assert_not_impl_all as assert_not_impl}; 12 use std::marker::PhantomPinned; 13 use std::{marker::PhantomData, pin::Pin}; 14 15 pub type LocalFuture<T = *const ()> = Pin<Box<dyn Future<Output = T>>>; 16 pub type LocalTryFuture<T = *const (), E = *const ()> = LocalFuture<Result<T, E>>; 17 pub type SendFuture<T = *const ()> = Pin<Box<dyn Future<Output = T> + Send>>; 18 pub type SendTryFuture<T = *const (), E = *const ()> = SendFuture<Result<T, E>>; 19 pub type SyncFuture<T = *const ()> = Pin<Box<dyn Future<Output = T> + Sync>>; 20 pub type SyncTryFuture<T = *const (), E = *const ()> = SyncFuture<Result<T, E>>; 21 pub type UnpinFuture<T = PhantomPinned> = LocalFuture<T>; 22 pub type UnpinTryFuture<T = PhantomPinned, E = PhantomPinned> = UnpinFuture<Result<T, E>>; 23 pub struct PinnedFuture<T = PhantomPinned>(PhantomPinned, PhantomData<T>); 24 impl<T> Future for PinnedFuture<T> { 25 type Output = T; poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Output>26 fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Output> { 27 unimplemented!() 28 } 29 } 30 pub type PinnedTryFuture<T = PhantomPinned, E = PhantomPinned> = PinnedFuture<Result<T, E>>; 31 32 pub type LocalStream<T = *const ()> = Pin<Box<dyn Stream<Item = T>>>; 33 pub type LocalTryStream<T = *const (), E = *const ()> = LocalStream<Result<T, E>>; 34 pub type SendStream<T = *const ()> = Pin<Box<dyn Stream<Item = T> + Send>>; 35 pub type SendTryStream<T = *const (), E = *const ()> = SendStream<Result<T, E>>; 36 pub type SyncStream<T = *const ()> = Pin<Box<dyn Stream<Item = T> + Sync>>; 37 pub type SyncTryStream<T = *const (), E = *const ()> = SyncStream<Result<T, E>>; 38 pub type UnpinStream<T = PhantomPinned> = LocalStream<T>; 39 pub type UnpinTryStream<T = PhantomPinned, E = PhantomPinned> = UnpinStream<Result<T, E>>; 40 pub struct PinnedStream<T = PhantomPinned>(PhantomPinned, PhantomData<T>); 41 impl<T> Stream for PinnedStream<T> { 42 type Item = T; poll_next(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<Self::Item>>43 fn poll_next(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<Self::Item>> { 44 unimplemented!() 45 } 46 } 47 pub type PinnedTryStream<T = PhantomPinned, E = PhantomPinned> = PinnedStream<Result<T, E>>; 48 49 pub type LocalSink<T = *const (), E = *const ()> = Pin<Box<dyn Sink<T, Error = E>>>; 50 pub type SendSink<T = *const (), E = *const ()> = Pin<Box<dyn Sink<T, Error = E> + Send>>; 51 pub type SyncSink<T = *const (), E = *const ()> = Pin<Box<dyn Sink<T, Error = E> + Sync>>; 52 pub type UnpinSink<T = PhantomPinned, E = PhantomPinned> = LocalSink<T, E>; 53 pub struct PinnedSink<T = PhantomPinned, E = PhantomPinned>(PhantomPinned, PhantomData<(T, E)>); 54 impl<T, E> Sink<T> for PinnedSink<T, E> { 55 type Error = E; poll_ready(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>56 fn poll_ready(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { 57 unimplemented!() 58 } start_send(self: Pin<&mut Self>, _: T) -> Result<(), Self::Error>59 fn start_send(self: Pin<&mut Self>, _: T) -> Result<(), Self::Error> { 60 unimplemented!() 61 } poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>62 fn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { 63 unimplemented!() 64 } poll_close(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>65 fn poll_close(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { 66 unimplemented!() 67 } 68 } 69 70 /// Assert Send/Sync/Unpin for all public types in `futures::channel`. 71 pub mod channel { 72 use super::*; 73 use futures::channel::*; 74 75 assert_impl!(mpsc::Receiver<()>: Send); 76 assert_not_impl!(mpsc::Receiver<*const ()>: Send); 77 assert_impl!(mpsc::Receiver<()>: Sync); 78 assert_not_impl!(mpsc::Receiver<*const ()>: Sync); 79 assert_impl!(mpsc::Receiver<PhantomPinned>: Unpin); 80 81 assert_impl!(mpsc::SendError: Send); 82 assert_impl!(mpsc::SendError: Sync); 83 assert_impl!(mpsc::SendError: Unpin); 84 85 assert_impl!(mpsc::Sender<()>: Send); 86 assert_not_impl!(mpsc::Sender<*const ()>: Send); 87 assert_impl!(mpsc::Sender<()>: Sync); 88 assert_not_impl!(mpsc::Sender<*const ()>: Sync); 89 assert_impl!(mpsc::Sender<PhantomPinned>: Unpin); 90 91 assert_impl!(mpsc::TryRecvError: Send); 92 assert_impl!(mpsc::TryRecvError: Sync); 93 assert_impl!(mpsc::TryRecvError: Unpin); 94 95 assert_impl!(mpsc::TrySendError<()>: Send); 96 assert_not_impl!(mpsc::TrySendError<*const ()>: Send); 97 assert_impl!(mpsc::TrySendError<()>: Sync); 98 assert_not_impl!(mpsc::TrySendError<*const ()>: Sync); 99 assert_impl!(mpsc::TrySendError<()>: Unpin); 100 assert_not_impl!(mpsc::TrySendError<PhantomPinned>: Unpin); 101 102 assert_impl!(mpsc::UnboundedReceiver<()>: Send); 103 assert_not_impl!(mpsc::UnboundedReceiver<*const ()>: Send); 104 assert_impl!(mpsc::UnboundedReceiver<()>: Sync); 105 assert_not_impl!(mpsc::UnboundedReceiver<*const ()>: Sync); 106 assert_impl!(mpsc::UnboundedReceiver<PhantomPinned>: Unpin); 107 108 assert_impl!(mpsc::UnboundedReceiver<()>: Send); 109 assert_not_impl!(mpsc::UnboundedReceiver<*const ()>: Send); 110 assert_impl!(mpsc::UnboundedReceiver<()>: Sync); 111 assert_not_impl!(mpsc::UnboundedReceiver<*const ()>: Sync); 112 assert_impl!(mpsc::UnboundedReceiver<PhantomPinned>: Unpin); 113 114 assert_impl!(oneshot::Canceled: Send); 115 assert_impl!(oneshot::Canceled: Sync); 116 assert_impl!(oneshot::Canceled: Unpin); 117 118 assert_impl!(oneshot::Cancellation<()>: Send); 119 assert_not_impl!(oneshot::Cancellation<*const ()>: Send); 120 assert_impl!(oneshot::Cancellation<()>: Sync); 121 assert_not_impl!(oneshot::Cancellation<*const ()>: Sync); 122 assert_impl!(oneshot::Cancellation<PhantomPinned>: Unpin); 123 124 assert_impl!(oneshot::Receiver<()>: Send); 125 assert_not_impl!(oneshot::Receiver<*const ()>: Send); 126 assert_impl!(oneshot::Receiver<()>: Sync); 127 assert_not_impl!(oneshot::Receiver<*const ()>: Sync); 128 assert_impl!(oneshot::Receiver<PhantomPinned>: Unpin); 129 130 assert_impl!(oneshot::Sender<()>: Send); 131 assert_not_impl!(oneshot::Sender<*const ()>: Send); 132 assert_impl!(oneshot::Sender<()>: Sync); 133 assert_not_impl!(oneshot::Sender<*const ()>: Sync); 134 assert_impl!(oneshot::Sender<PhantomPinned>: Unpin); 135 } 136 137 /// Assert Send/Sync/Unpin for all public types in `futures::compat`. 138 pub mod compat { 139 use super::*; 140 use futures::compat::*; 141 142 assert_impl!(Compat<()>: Send); 143 assert_not_impl!(Compat<*const ()>: Send); 144 assert_impl!(Compat<()>: Sync); 145 assert_not_impl!(Compat<*const ()>: Sync); 146 assert_impl!(Compat<()>: Unpin); 147 assert_not_impl!(Compat<PhantomPinned>: Unpin); 148 149 assert_impl!(Compat01As03<()>: Send); 150 assert_not_impl!(Compat01As03<*const ()>: Send); 151 assert_not_impl!(Compat01As03<()>: Sync); 152 assert_impl!(Compat01As03<PhantomPinned>: Unpin); 153 154 assert_impl!(Compat01As03Sink<(), ()>: Send); 155 assert_not_impl!(Compat01As03Sink<(), *const ()>: Send); 156 assert_not_impl!(Compat01As03Sink<*const (), ()>: Send); 157 assert_not_impl!(Compat01As03Sink<(), ()>: Sync); 158 assert_impl!(Compat01As03Sink<PhantomPinned, PhantomPinned>: Unpin); 159 160 assert_impl!(CompatSink<(), *const ()>: Send); 161 assert_not_impl!(CompatSink<*const (), ()>: Send); 162 assert_impl!(CompatSink<(), *const ()>: Sync); 163 assert_not_impl!(CompatSink<*const (), ()>: Sync); 164 assert_impl!(CompatSink<(), PhantomPinned>: Unpin); 165 assert_not_impl!(CompatSink<PhantomPinned, ()>: Unpin); 166 167 assert_impl!(Executor01As03<()>: Send); 168 assert_not_impl!(Executor01As03<*const ()>: Send); 169 assert_impl!(Executor01As03<()>: Sync); 170 assert_not_impl!(Executor01As03<*const ()>: Sync); 171 assert_impl!(Executor01As03<()>: Unpin); 172 assert_not_impl!(Executor01As03<PhantomPinned>: Unpin); 173 174 assert_impl!(Executor01Future: Send); 175 assert_not_impl!(Executor01Future: Sync); 176 assert_impl!(Executor01Future: Unpin); 177 } 178 179 /// Assert Send/Sync/Unpin for all public types in `futures::executor`. 180 pub mod executor { 181 use super::*; 182 use futures::executor::*; 183 184 assert_impl!(BlockingStream<SendStream>: Send); 185 assert_not_impl!(BlockingStream<LocalStream>: Send); 186 assert_impl!(BlockingStream<SyncStream>: Sync); 187 assert_not_impl!(BlockingStream<LocalStream>: Sync); 188 assert_impl!(BlockingStream<UnpinStream>: Unpin); 189 // BlockingStream requires `S: Unpin` 190 // assert_not_impl!(BlockingStream<PinnedStream>: Unpin); 191 192 assert_impl!(Enter: Send); 193 assert_impl!(Enter: Sync); 194 assert_impl!(Enter: Unpin); 195 196 assert_impl!(EnterError: Send); 197 assert_impl!(EnterError: Sync); 198 assert_impl!(EnterError: Unpin); 199 200 assert_not_impl!(LocalPool: Send); 201 assert_not_impl!(LocalPool: Sync); 202 assert_impl!(LocalPool: Unpin); 203 204 assert_not_impl!(LocalSpawner: Send); 205 assert_not_impl!(LocalSpawner: Sync); 206 assert_impl!(LocalSpawner: Unpin); 207 208 assert_impl!(ThreadPool: Send); 209 assert_impl!(ThreadPool: Sync); 210 assert_impl!(ThreadPool: Unpin); 211 212 assert_impl!(ThreadPoolBuilder: Send); 213 assert_impl!(ThreadPoolBuilder: Sync); 214 assert_impl!(ThreadPoolBuilder: Unpin); 215 } 216 217 /// Assert Send/Sync/Unpin for all public types in `futures::future`. 218 pub mod future { 219 use super::*; 220 use futures::future::*; 221 222 assert_impl!(AbortHandle: Send); 223 assert_impl!(AbortHandle: Sync); 224 assert_impl!(AbortHandle: Unpin); 225 226 assert_impl!(AbortRegistration: Send); 227 assert_impl!(AbortRegistration: Sync); 228 assert_impl!(AbortRegistration: Unpin); 229 230 assert_impl!(Abortable<SendFuture>: Send); 231 assert_not_impl!(Abortable<LocalFuture>: Send); 232 assert_impl!(Abortable<SyncFuture>: Sync); 233 assert_not_impl!(Abortable<LocalFuture>: Sync); 234 assert_impl!(Abortable<UnpinFuture>: Unpin); 235 assert_not_impl!(Abortable<PinnedFuture>: Unpin); 236 237 assert_impl!(Aborted: Send); 238 assert_impl!(Aborted: Sync); 239 assert_impl!(Aborted: Unpin); 240 241 assert_impl!(AndThen<SendFuture, SendFuture, ()>: Send); 242 assert_not_impl!(AndThen<SendFuture, LocalFuture, ()>: Send); 243 assert_not_impl!(AndThen<LocalFuture, SendFuture, ()>: Send); 244 assert_not_impl!(AndThen<SendFuture, SendFuture, *const ()>: Send); 245 assert_impl!(AndThen<SyncFuture, SyncFuture, ()>: Sync); 246 assert_not_impl!(AndThen<SyncFuture, LocalFuture, ()>: Sync); 247 assert_not_impl!(AndThen<LocalFuture, SyncFuture, ()>: Sync); 248 assert_not_impl!(AndThen<SyncFuture, SyncFuture, *const ()>: Sync); 249 assert_impl!(AndThen<UnpinFuture, UnpinFuture, PhantomPinned>: Unpin); 250 assert_not_impl!(AndThen<PinnedFuture, UnpinFuture, PhantomPinned>: Unpin); 251 assert_not_impl!(AndThen<UnpinFuture, PinnedFuture, PhantomPinned>: Unpin); 252 253 assert_impl!(CatchUnwind<SendFuture>: Send); 254 assert_not_impl!(CatchUnwind<LocalFuture>: Send); 255 assert_impl!(CatchUnwind<SyncFuture>: Sync); 256 assert_not_impl!(CatchUnwind<LocalFuture>: Sync); 257 assert_impl!(CatchUnwind<UnpinFuture>: Unpin); 258 assert_not_impl!(CatchUnwind<PinnedFuture>: Unpin); 259 260 assert_impl!(ErrInto<SendTryFuture, *const ()>: Send); 261 assert_not_impl!(ErrInto<LocalTryFuture, ()>: Send); 262 assert_impl!(ErrInto<SyncTryFuture, *const ()>: Sync); 263 assert_not_impl!(ErrInto<LocalTryFuture, ()>: Sync); 264 assert_impl!(ErrInto<UnpinTryFuture, PhantomPinned>: Unpin); 265 assert_not_impl!(ErrInto<PinnedTryFuture, PhantomPinned>: Unpin); 266 267 assert_impl!(Flatten<SendFuture<()>>: Send); 268 assert_not_impl!(Flatten<LocalFuture>: Send); 269 assert_not_impl!(Flatten<SendFuture>: Send); 270 assert_impl!(Flatten<SyncFuture<()>>: Sync); 271 assert_not_impl!(Flatten<LocalFuture>: Sync); 272 assert_not_impl!(Flatten<SyncFuture>: Sync); 273 assert_impl!(Flatten<UnpinFuture<()>>: Unpin); 274 assert_not_impl!(Flatten<PinnedFuture>: Unpin); 275 assert_not_impl!(Flatten<UnpinFuture>: Unpin); 276 277 assert_impl!(FlattenSink<SendFuture, ()>: Send); 278 assert_not_impl!(FlattenSink<SendFuture, *const ()>: Send); 279 assert_not_impl!(FlattenSink<LocalFuture, ()>: Send); 280 assert_impl!(FlattenSink<SyncFuture, ()>: Sync); 281 assert_not_impl!(FlattenSink<SyncFuture, *const ()>: Sync); 282 assert_not_impl!(FlattenSink<LocalFuture, ()>: Sync); 283 assert_impl!(FlattenSink<UnpinFuture, ()>: Unpin); 284 assert_not_impl!(FlattenSink<UnpinFuture, PhantomPinned>: Unpin); 285 assert_not_impl!(FlattenSink<PinnedFuture, ()>: Unpin); 286 287 assert_impl!(FlattenStream<SendFuture<()>>: Send); 288 assert_not_impl!(FlattenStream<LocalFuture>: Send); 289 assert_not_impl!(FlattenStream<SendFuture>: Send); 290 assert_impl!(FlattenStream<SyncFuture<()>>: Sync); 291 assert_not_impl!(FlattenStream<LocalFuture>: Sync); 292 assert_not_impl!(FlattenStream<SyncFuture>: Sync); 293 assert_impl!(FlattenStream<UnpinFuture<()>>: Unpin); 294 assert_not_impl!(FlattenStream<PinnedFuture>: Unpin); 295 assert_not_impl!(FlattenStream<UnpinFuture>: Unpin); 296 297 assert_impl!(Fuse<SendFuture>: Send); 298 assert_not_impl!(Fuse<LocalFuture>: Send); 299 assert_impl!(Fuse<SyncFuture>: Sync); 300 assert_not_impl!(Fuse<LocalFuture>: Sync); 301 assert_impl!(Fuse<UnpinFuture>: Unpin); 302 assert_not_impl!(Fuse<PinnedFuture>: Unpin); 303 304 assert_impl!(FutureObj<*const ()>: Send); 305 assert_not_impl!(FutureObj<()>: Sync); 306 assert_impl!(FutureObj<PhantomPinned>: Unpin); 307 308 assert_impl!(Inspect<SendFuture, ()>: Send); 309 assert_not_impl!(Inspect<SendFuture, *const ()>: Send); 310 assert_not_impl!(Inspect<LocalFuture, ()>: Send); 311 assert_impl!(Inspect<SyncFuture, ()>: Sync); 312 assert_not_impl!(Inspect<SyncFuture, *const ()>: Sync); 313 assert_not_impl!(Inspect<LocalFuture, ()>: Sync); 314 assert_impl!(Inspect<UnpinFuture, PhantomPinned>: Unpin); 315 assert_not_impl!(Inspect<PhantomPinned, PhantomPinned>: Unpin); 316 317 assert_impl!(InspectErr<SendFuture, ()>: Send); 318 assert_not_impl!(InspectErr<SendFuture, *const ()>: Send); 319 assert_not_impl!(InspectErr<LocalFuture, ()>: Send); 320 assert_impl!(InspectErr<SyncFuture, ()>: Sync); 321 assert_not_impl!(InspectErr<SyncFuture, *const ()>: Sync); 322 assert_not_impl!(InspectErr<LocalFuture, ()>: Sync); 323 assert_impl!(InspectErr<UnpinFuture, PhantomPinned>: Unpin); 324 assert_not_impl!(InspectErr<PhantomPinned, PhantomPinned>: Unpin); 325 326 assert_impl!(InspectOk<SendFuture, ()>: Send); 327 assert_not_impl!(InspectOk<SendFuture, *const ()>: Send); 328 assert_not_impl!(InspectOk<LocalFuture, ()>: Send); 329 assert_impl!(InspectOk<SyncFuture, ()>: Sync); 330 assert_not_impl!(InspectOk<SyncFuture, *const ()>: Sync); 331 assert_not_impl!(InspectOk<LocalFuture, ()>: Sync); 332 assert_impl!(InspectOk<UnpinFuture, PhantomPinned>: Unpin); 333 assert_not_impl!(InspectOk<PhantomPinned, PhantomPinned>: Unpin); 334 335 assert_impl!(IntoFuture<SendFuture>: Send); 336 assert_not_impl!(IntoFuture<LocalFuture>: Send); 337 assert_impl!(IntoFuture<SyncFuture>: Sync); 338 assert_not_impl!(IntoFuture<LocalFuture>: Sync); 339 assert_impl!(IntoFuture<UnpinFuture>: Unpin); 340 assert_not_impl!(IntoFuture<PinnedFuture>: Unpin); 341 342 assert_impl!(IntoStream<SendFuture>: Send); 343 assert_not_impl!(IntoStream<LocalFuture>: Send); 344 assert_impl!(IntoStream<SyncFuture>: Sync); 345 assert_not_impl!(IntoStream<LocalFuture>: Sync); 346 assert_impl!(IntoStream<UnpinFuture>: Unpin); 347 assert_not_impl!(IntoStream<PinnedFuture>: Unpin); 348 349 assert_impl!(Join<SendFuture<()>, SendFuture<()>>: Send); 350 assert_not_impl!(Join<SendFuture<()>, SendFuture>: Send); 351 assert_not_impl!(Join<SendFuture, SendFuture<()>>: Send); 352 assert_not_impl!(Join<SendFuture, LocalFuture>: Send); 353 assert_not_impl!(Join<LocalFuture, SendFuture>: Send); 354 assert_impl!(Join<SyncFuture<()>, SyncFuture<()>>: Sync); 355 assert_not_impl!(Join<SyncFuture<()>, SyncFuture>: Sync); 356 assert_not_impl!(Join<SyncFuture, SyncFuture<()>>: Sync); 357 assert_not_impl!(Join<SyncFuture, LocalFuture>: Sync); 358 assert_not_impl!(Join<LocalFuture, SyncFuture>: Sync); 359 assert_impl!(Join<UnpinFuture, UnpinFuture>: Unpin); 360 assert_not_impl!(Join<PinnedFuture, UnpinFuture>: Unpin); 361 assert_not_impl!(Join<UnpinFuture, PinnedFuture>: Unpin); 362 363 // Join3, Join4, Join5 are the same as Join 364 365 assert_impl!(JoinAll<SendFuture<()>>: Send); 366 assert_not_impl!(JoinAll<LocalFuture>: Send); 367 assert_not_impl!(JoinAll<SendFuture>: Send); 368 assert_impl!(JoinAll<SyncFuture<()>>: Sync); 369 assert_not_impl!(JoinAll<LocalFuture>: Sync); 370 assert_not_impl!(JoinAll<SyncFuture>: Sync); 371 assert_impl!(JoinAll<PinnedFuture>: Unpin); 372 373 assert_impl!(Lazy<()>: Send); 374 assert_not_impl!(Lazy<*const ()>: Send); 375 assert_impl!(Lazy<()>: Sync); 376 assert_not_impl!(Lazy<*const ()>: Sync); 377 assert_impl!(Lazy<PhantomPinned>: Unpin); 378 379 assert_not_impl!(LocalFutureObj<()>: Send); 380 assert_not_impl!(LocalFutureObj<()>: Sync); 381 assert_impl!(LocalFutureObj<PhantomPinned>: Unpin); 382 383 assert_impl!(Map<SendFuture, ()>: Send); 384 assert_not_impl!(Map<SendFuture, *const ()>: Send); 385 assert_not_impl!(Map<LocalFuture, ()>: Send); 386 assert_impl!(Map<SyncFuture, ()>: Sync); 387 assert_not_impl!(Map<SyncFuture, *const ()>: Sync); 388 assert_not_impl!(Map<LocalFuture, ()>: Sync); 389 assert_impl!(Map<UnpinFuture, PhantomPinned>: Unpin); 390 assert_not_impl!(Map<PhantomPinned, ()>: Unpin); 391 392 assert_impl!(MapErr<SendFuture, ()>: Send); 393 assert_not_impl!(MapErr<SendFuture, *const ()>: Send); 394 assert_not_impl!(MapErr<LocalFuture, ()>: Send); 395 assert_impl!(MapErr<SyncFuture, ()>: Sync); 396 assert_not_impl!(MapErr<SyncFuture, *const ()>: Sync); 397 assert_not_impl!(MapErr<LocalFuture, ()>: Sync); 398 assert_impl!(MapErr<UnpinFuture, PhantomPinned>: Unpin); 399 assert_not_impl!(MapErr<PhantomPinned, ()>: Unpin); 400 401 assert_impl!(MapInto<SendFuture, *const ()>: Send); 402 assert_not_impl!(MapInto<LocalFuture, ()>: Send); 403 assert_impl!(MapInto<SyncFuture, *const ()>: Sync); 404 assert_not_impl!(MapInto<LocalFuture, ()>: Sync); 405 assert_impl!(MapInto<UnpinFuture, PhantomPinned>: Unpin); 406 assert_not_impl!(MapInto<PhantomPinned, ()>: Unpin); 407 408 assert_impl!(MapOk<SendFuture, ()>: Send); 409 assert_not_impl!(MapOk<SendFuture, *const ()>: Send); 410 assert_not_impl!(MapOk<LocalFuture, ()>: Send); 411 assert_impl!(MapOk<SyncFuture, ()>: Sync); 412 assert_not_impl!(MapOk<SyncFuture, *const ()>: Sync); 413 assert_not_impl!(MapOk<LocalFuture, ()>: Sync); 414 assert_impl!(MapOk<UnpinFuture, PhantomPinned>: Unpin); 415 assert_not_impl!(MapOk<PhantomPinned, ()>: Unpin); 416 417 assert_impl!(MapOkOrElse<SendFuture, (), ()>: Send); 418 assert_not_impl!(MapOkOrElse<SendFuture, (), *const ()>: Send); 419 assert_not_impl!(MapOkOrElse<SendFuture, *const (), ()>: Send); 420 assert_not_impl!(MapOkOrElse<LocalFuture, (), ()>: Send); 421 assert_impl!(MapOkOrElse<SyncFuture, (), ()>: Sync); 422 assert_not_impl!(MapOkOrElse<SyncFuture, (), *const ()>: Sync); 423 assert_not_impl!(MapOkOrElse<SyncFuture, *const (), ()>: Sync); 424 assert_not_impl!(MapOkOrElse<LocalFuture, (), ()>: Sync); 425 assert_impl!(MapOkOrElse<UnpinFuture, PhantomPinned, PhantomPinned>: Unpin); 426 assert_not_impl!(MapOkOrElse<PhantomPinned, (), ()>: Unpin); 427 428 assert_impl!(NeverError<SendFuture>: Send); 429 assert_not_impl!(NeverError<LocalFuture>: Send); 430 assert_impl!(NeverError<SyncFuture>: Sync); 431 assert_not_impl!(NeverError<LocalFuture>: Sync); 432 assert_impl!(NeverError<UnpinFuture>: Unpin); 433 assert_not_impl!(NeverError<PinnedFuture>: Unpin); 434 435 assert_impl!(OkInto<SendFuture, *const ()>: Send); 436 assert_not_impl!(OkInto<LocalFuture, ()>: Send); 437 assert_impl!(OkInto<SyncFuture, *const ()>: Sync); 438 assert_not_impl!(OkInto<LocalFuture, ()>: Sync); 439 assert_impl!(OkInto<UnpinFuture, PhantomPinned>: Unpin); 440 assert_not_impl!(OkInto<PhantomPinned, ()>: Unpin); 441 442 assert_impl!(OptionFuture<SendFuture>: Send); 443 assert_not_impl!(OptionFuture<LocalFuture>: Send); 444 assert_impl!(OptionFuture<SyncFuture>: Sync); 445 assert_not_impl!(OptionFuture<LocalFuture>: Sync); 446 assert_impl!(OptionFuture<UnpinFuture>: Unpin); 447 assert_not_impl!(OptionFuture<PinnedFuture>: Unpin); 448 449 assert_impl!(OrElse<SendFuture, SendFuture, ()>: Send); 450 assert_not_impl!(OrElse<SendFuture, LocalFuture, ()>: Send); 451 assert_not_impl!(OrElse<LocalFuture, SendFuture, ()>: Send); 452 assert_not_impl!(OrElse<SendFuture, SendFuture, *const ()>: Send); 453 assert_impl!(OrElse<SyncFuture, SyncFuture, ()>: Sync); 454 assert_not_impl!(OrElse<SyncFuture, LocalFuture, ()>: Sync); 455 assert_not_impl!(OrElse<LocalFuture, SyncFuture, ()>: Sync); 456 assert_not_impl!(OrElse<SyncFuture, SyncFuture, *const ()>: Sync); 457 assert_impl!(OrElse<UnpinFuture, UnpinFuture, PhantomPinned>: Unpin); 458 assert_not_impl!(OrElse<PinnedFuture, UnpinFuture, PhantomPinned>: Unpin); 459 assert_not_impl!(OrElse<UnpinFuture, PinnedFuture, PhantomPinned>: Unpin); 460 461 assert_impl!(Pending<()>: Send); 462 assert_not_impl!(Pending<*const ()>: Send); 463 assert_impl!(Pending<()>: Sync); 464 assert_not_impl!(Pending<*const ()>: Sync); 465 assert_impl!(Pending<PhantomPinned>: Unpin); 466 467 assert_impl!(PollFn<()>: Send); 468 assert_not_impl!(PollFn<*const ()>: Send); 469 assert_impl!(PollFn<()>: Sync); 470 assert_not_impl!(PollFn<*const ()>: Sync); 471 assert_impl!(PollFn<PhantomPinned>: Unpin); 472 473 assert_impl!(PollImmediate<SendStream>: Send); 474 assert_not_impl!(PollImmediate<LocalStream<()>>: Send); 475 assert_impl!(PollImmediate<SyncStream>: Sync); 476 assert_not_impl!(PollImmediate<LocalStream<()>>: Sync); 477 assert_impl!(PollImmediate<UnpinStream>: Unpin); 478 assert_not_impl!(PollImmediate<PinnedStream>: Unpin); 479 480 assert_impl!(Ready<()>: Send); 481 assert_not_impl!(Ready<*const ()>: Send); 482 assert_impl!(Ready<()>: Sync); 483 assert_not_impl!(Ready<*const ()>: Sync); 484 assert_impl!(Ready<PhantomPinned>: Unpin); 485 486 assert_impl!(Remote<SendFuture<()>>: Send); 487 assert_not_impl!(Remote<LocalFuture>: Send); 488 assert_not_impl!(Remote<SendFuture>: Send); 489 assert_impl!(Remote<SyncFuture<()>>: Sync); 490 assert_not_impl!(Remote<LocalFuture>: Sync); 491 assert_not_impl!(Remote<SyncFuture>: Sync); 492 assert_impl!(Remote<UnpinFuture>: Unpin); 493 assert_not_impl!(Remote<PinnedFuture>: Unpin); 494 495 assert_impl!(RemoteHandle<()>: Send); 496 assert_not_impl!(RemoteHandle<*const ()>: Send); 497 assert_impl!(RemoteHandle<()>: Sync); 498 assert_not_impl!(RemoteHandle<*const ()>: Sync); 499 assert_impl!(RemoteHandle<PhantomPinned>: Unpin); 500 501 assert_impl!(Select<SendFuture, SendFuture>: Send); 502 assert_not_impl!(Select<SendFuture, LocalFuture>: Send); 503 assert_not_impl!(Select<LocalFuture, SendFuture>: Send); 504 assert_impl!(Select<SyncFuture, SyncFuture>: Sync); 505 assert_not_impl!(Select<SyncFuture, LocalFuture>: Sync); 506 assert_not_impl!(Select<LocalFuture, SyncFuture>: Sync); 507 assert_impl!(Select<UnpinFuture, UnpinFuture>: Unpin); 508 assert_not_impl!(Select<PinnedFuture, UnpinFuture>: Unpin); 509 assert_not_impl!(Select<UnpinFuture, PinnedFuture>: Unpin); 510 511 assert_impl!(SelectAll<SendFuture>: Send); 512 assert_not_impl!(SelectAll<LocalFuture>: Send); 513 assert_impl!(SelectAll<SyncFuture>: Sync); 514 assert_not_impl!(SelectAll<LocalFuture>: Sync); 515 assert_impl!(SelectAll<UnpinFuture>: Unpin); 516 assert_not_impl!(SelectAll<PinnedFuture>: Unpin); 517 518 assert_impl!(SelectOk<SendFuture>: Send); 519 assert_not_impl!(SelectOk<LocalFuture>: Send); 520 assert_impl!(SelectOk<SyncFuture>: Sync); 521 assert_not_impl!(SelectOk<LocalFuture>: Sync); 522 assert_impl!(SelectOk<UnpinFuture>: Unpin); 523 assert_not_impl!(SelectOk<PinnedFuture>: Unpin); 524 525 assert_impl!(Shared<SendFuture<()>>: Send); 526 assert_not_impl!(Shared<SendFuture>: Send); 527 assert_not_impl!(Shared<LocalFuture>: Send); 528 assert_not_impl!(Shared<SyncFuture<()>>: Sync); 529 assert_impl!(Shared<PinnedFuture>: Unpin); 530 531 assert_impl!(Then<SendFuture, SendFuture, ()>: Send); 532 assert_not_impl!(Then<SendFuture, SendFuture, *const ()>: Send); 533 assert_not_impl!(Then<SendFuture, LocalFuture, ()>: Send); 534 assert_not_impl!(Then<LocalFuture, SendFuture, ()>: Send); 535 assert_impl!(Then<SyncFuture, SyncFuture, ()>: Sync); 536 assert_not_impl!(Then<SyncFuture, SyncFuture, *const ()>: Sync); 537 assert_not_impl!(Then<SyncFuture, LocalFuture, ()>: Sync); 538 assert_not_impl!(Then<LocalFuture, SyncFuture, ()>: Sync); 539 assert_impl!(Then<UnpinFuture, UnpinFuture, PhantomPinned>: Unpin); 540 assert_not_impl!(Then<PinnedFuture, UnpinFuture, ()>: Unpin); 541 assert_not_impl!(Then<UnpinFuture, PinnedFuture, ()>: Unpin); 542 543 assert_impl!(TryFlatten<SendTryFuture<()>, ()>: Send); 544 assert_not_impl!(TryFlatten<LocalTryFuture, ()>: Send); 545 assert_not_impl!(TryFlatten<SendTryFuture, *const ()>: Send); 546 assert_impl!(TryFlatten<SyncTryFuture<()>, ()>: Sync); 547 assert_not_impl!(TryFlatten<LocalTryFuture, ()>: Sync); 548 assert_not_impl!(TryFlatten<SyncTryFuture, *const ()>: Sync); 549 assert_impl!(TryFlatten<UnpinTryFuture<()>, ()>: Unpin); 550 assert_not_impl!(TryFlatten<PinnedTryFuture, ()>: Unpin); 551 assert_not_impl!(TryFlatten<UnpinTryFuture, PhantomPinned>: Unpin); 552 553 assert_impl!(TryFlattenStream<SendTryFuture<()>>: Send); 554 assert_not_impl!(TryFlattenStream<LocalTryFuture>: Send); 555 assert_not_impl!(TryFlattenStream<SendTryFuture>: Send); 556 assert_impl!(TryFlattenStream<SyncTryFuture<()>>: Sync); 557 assert_not_impl!(TryFlattenStream<LocalTryFuture>: Sync); 558 assert_not_impl!(TryFlattenStream<SyncTryFuture>: Sync); 559 assert_impl!(TryFlattenStream<UnpinTryFuture<()>>: Unpin); 560 assert_not_impl!(TryFlattenStream<PinnedTryFuture>: Unpin); 561 assert_not_impl!(TryFlattenStream<UnpinTryFuture>: Unpin); 562 563 assert_impl!(TryJoin<SendTryFuture<()>, SendTryFuture<()>>: Send); 564 assert_not_impl!(TryJoin<SendTryFuture<()>, SendTryFuture>: Send); 565 assert_not_impl!(TryJoin<SendTryFuture, SendTryFuture<()>>: Send); 566 assert_not_impl!(TryJoin<SendTryFuture, LocalTryFuture>: Send); 567 assert_not_impl!(TryJoin<LocalTryFuture, SendTryFuture>: Send); 568 assert_impl!(TryJoin<SyncTryFuture<()>, SyncTryFuture<()>>: Sync); 569 assert_not_impl!(TryJoin<SyncTryFuture<()>, SyncTryFuture>: Sync); 570 assert_not_impl!(TryJoin<SyncTryFuture, SyncTryFuture<()>>: Sync); 571 assert_not_impl!(TryJoin<SyncTryFuture, LocalTryFuture>: Sync); 572 assert_not_impl!(TryJoin<LocalTryFuture, SyncTryFuture>: Sync); 573 assert_impl!(TryJoin<UnpinTryFuture, UnpinTryFuture>: Unpin); 574 assert_not_impl!(TryJoin<PinnedTryFuture, UnpinTryFuture>: Unpin); 575 assert_not_impl!(TryJoin<UnpinTryFuture, PinnedTryFuture>: Unpin); 576 577 // TryJoin3, TryJoin4, TryJoin5 are the same as TryJoin 578 579 assert_impl!(TryJoinAll<SendTryFuture<()>>: Send); 580 assert_not_impl!(TryJoinAll<LocalTryFuture>: Send); 581 assert_not_impl!(TryJoinAll<SendTryFuture>: Send); 582 assert_impl!(TryJoinAll<SyncTryFuture<()>>: Sync); 583 assert_not_impl!(TryJoinAll<LocalTryFuture>: Sync); 584 assert_not_impl!(TryJoinAll<SyncTryFuture>: Sync); 585 assert_impl!(TryJoinAll<PinnedTryFuture>: Unpin); 586 587 assert_impl!(TrySelect<SendFuture, SendFuture>: Send); 588 assert_not_impl!(TrySelect<SendFuture, LocalFuture>: Send); 589 assert_not_impl!(TrySelect<LocalFuture, SendFuture>: Send); 590 assert_impl!(TrySelect<SyncFuture, SyncFuture>: Sync); 591 assert_not_impl!(TrySelect<SyncFuture, LocalFuture>: Sync); 592 assert_not_impl!(TrySelect<LocalFuture, SyncFuture>: Sync); 593 assert_impl!(TrySelect<UnpinFuture, UnpinFuture>: Unpin); 594 assert_not_impl!(TrySelect<PinnedFuture, UnpinFuture>: Unpin); 595 assert_not_impl!(TrySelect<UnpinFuture, PinnedFuture>: Unpin); 596 597 assert_impl!(UnitError<SendFuture>: Send); 598 assert_not_impl!(UnitError<LocalFuture>: Send); 599 assert_impl!(UnitError<SyncFuture>: Sync); 600 assert_not_impl!(UnitError<LocalFuture>: Sync); 601 assert_impl!(UnitError<UnpinFuture>: Unpin); 602 assert_not_impl!(UnitError<PinnedFuture>: Unpin); 603 604 assert_impl!(UnwrapOrElse<SendFuture, ()>: Send); 605 assert_not_impl!(UnwrapOrElse<SendFuture, *const ()>: Send); 606 assert_not_impl!(UnwrapOrElse<LocalFuture, ()>: Send); 607 assert_impl!(UnwrapOrElse<SyncFuture, ()>: Sync); 608 assert_not_impl!(UnwrapOrElse<SyncFuture, *const ()>: Sync); 609 assert_not_impl!(UnwrapOrElse<LocalFuture, ()>: Sync); 610 assert_impl!(UnwrapOrElse<UnpinFuture, PhantomPinned>: Unpin); 611 assert_not_impl!(UnwrapOrElse<PhantomPinned, ()>: Unpin); 612 613 assert_impl!(WeakShared<SendFuture<()>>: Send); 614 assert_not_impl!(WeakShared<SendFuture>: Send); 615 assert_not_impl!(WeakShared<LocalFuture>: Send); 616 assert_not_impl!(WeakShared<SyncFuture<()>>: Sync); 617 assert_impl!(WeakShared<PinnedFuture>: Unpin); 618 619 assert_impl!(Either<SendFuture, SendFuture>: Send); 620 assert_not_impl!(Either<SendFuture, LocalFuture>: Send); 621 assert_not_impl!(Either<LocalFuture, SendFuture>: Send); 622 assert_impl!(Either<SyncFuture, SyncFuture>: Sync); 623 assert_not_impl!(Either<SyncFuture, LocalFuture>: Sync); 624 assert_not_impl!(Either<LocalFuture, SyncFuture>: Sync); 625 assert_impl!(Either<UnpinFuture, UnpinFuture>: Unpin); 626 assert_not_impl!(Either<UnpinFuture, PinnedFuture>: Unpin); 627 assert_not_impl!(Either<PinnedFuture, UnpinFuture>: Unpin); 628 629 assert_impl!(MaybeDone<SendFuture<()>>: Send); 630 assert_not_impl!(MaybeDone<SendFuture>: Send); 631 assert_not_impl!(MaybeDone<LocalFuture>: Send); 632 assert_impl!(MaybeDone<SyncFuture<()>>: Sync); 633 assert_not_impl!(MaybeDone<SyncFuture>: Sync); 634 assert_not_impl!(MaybeDone<LocalFuture>: Sync); 635 assert_impl!(MaybeDone<UnpinFuture>: Unpin); 636 assert_not_impl!(MaybeDone<PinnedFuture>: Unpin); 637 638 assert_impl!(TryMaybeDone<SendTryFuture<()>>: Send); 639 assert_not_impl!(TryMaybeDone<SendTryFuture>: Send); 640 assert_not_impl!(TryMaybeDone<LocalTryFuture>: Send); 641 assert_impl!(TryMaybeDone<SyncTryFuture<()>>: Sync); 642 assert_not_impl!(TryMaybeDone<SyncTryFuture>: Sync); 643 assert_not_impl!(TryMaybeDone<LocalTryFuture>: Sync); 644 assert_impl!(TryMaybeDone<UnpinTryFuture>: Unpin); 645 assert_not_impl!(TryMaybeDone<PinnedTryFuture>: Unpin); 646 } 647 648 /// Assert Send/Sync/Unpin for all public types in `futures::io`. 649 pub mod io { 650 use super::*; 651 use futures::io::{Sink, *}; 652 653 assert_impl!(AllowStdIo<()>: Send); 654 assert_not_impl!(AllowStdIo<*const ()>: Send); 655 assert_impl!(AllowStdIo<()>: Sync); 656 assert_not_impl!(AllowStdIo<*const ()>: Sync); 657 assert_impl!(AllowStdIo<PhantomPinned>: Unpin); 658 659 assert_impl!(BufReader<()>: Send); 660 assert_not_impl!(BufReader<*const ()>: Send); 661 assert_impl!(BufReader<()>: Sync); 662 assert_not_impl!(BufReader<*const ()>: Sync); 663 assert_impl!(BufReader<()>: Unpin); 664 assert_not_impl!(BufReader<PhantomPinned>: Unpin); 665 666 assert_impl!(BufWriter<()>: Send); 667 assert_not_impl!(BufWriter<*const ()>: Send); 668 assert_impl!(BufWriter<()>: Sync); 669 assert_not_impl!(BufWriter<*const ()>: Sync); 670 assert_impl!(BufWriter<()>: Unpin); 671 assert_not_impl!(BufWriter<PhantomPinned>: Unpin); 672 673 assert_impl!(Chain<(), ()>: Send); 674 assert_not_impl!(Chain<(), *const ()>: Send); 675 assert_not_impl!(Chain<*const (), ()>: Send); 676 assert_impl!(Chain<(), ()>: Sync); 677 assert_not_impl!(Chain<(), *const ()>: Sync); 678 assert_not_impl!(Chain<*const (), ()>: Sync); 679 assert_impl!(Chain<(), ()>: Unpin); 680 assert_not_impl!(Chain<(), PhantomPinned>: Unpin); 681 assert_not_impl!(Chain<PhantomPinned, ()>: Unpin); 682 683 assert_impl!(Close<'_, ()>: Send); 684 assert_not_impl!(Close<'_, *const ()>: Send); 685 assert_impl!(Close<'_, ()>: Sync); 686 assert_not_impl!(Close<'_, *const ()>: Sync); 687 assert_impl!(Close<'_, ()>: Unpin); 688 assert_not_impl!(Close<'_, PhantomPinned>: Unpin); 689 690 assert_impl!(Copy<(), ()>: Send); 691 assert_not_impl!(Copy<(), *const ()>: Send); 692 assert_not_impl!(Copy<*const (), ()>: Send); 693 assert_impl!(Copy<(), ()>: Sync); 694 assert_not_impl!(Copy<(), *const ()>: Sync); 695 assert_not_impl!(Copy<*const (), ()>: Sync); 696 assert_impl!(Copy<(), PhantomPinned>: Unpin); 697 assert_not_impl!(Copy<PhantomPinned, ()>: Unpin); 698 699 assert_impl!(CopyBuf<(), ()>: Send); 700 assert_not_impl!(CopyBuf<(), *const ()>: Send); 701 assert_not_impl!(CopyBuf<*const (), ()>: Send); 702 assert_impl!(CopyBuf<(), ()>: Sync); 703 assert_not_impl!(CopyBuf<(), *const ()>: Sync); 704 assert_not_impl!(CopyBuf<*const (), ()>: Sync); 705 assert_impl!(CopyBuf<(), PhantomPinned>: Unpin); 706 assert_not_impl!(CopyBuf<PhantomPinned, ()>: Unpin); 707 708 assert_impl!(Cursor<()>: Send); 709 assert_not_impl!(Cursor<*const ()>: Send); 710 assert_impl!(Cursor<()>: Sync); 711 assert_not_impl!(Cursor<*const ()>: Sync); 712 assert_impl!(Cursor<()>: Unpin); 713 assert_not_impl!(Cursor<PhantomPinned>: Unpin); 714 715 assert_impl!(Empty: Send); 716 assert_impl!(Empty: Sync); 717 assert_impl!(Empty: Unpin); 718 719 assert_impl!(FillBuf<'_, ()>: Send); 720 assert_not_impl!(FillBuf<'_, *const ()>: Send); 721 assert_impl!(FillBuf<'_, ()>: Sync); 722 assert_not_impl!(FillBuf<'_, *const ()>: Sync); 723 assert_impl!(FillBuf<'_, PhantomPinned>: Unpin); 724 725 assert_impl!(Flush<'_, ()>: Send); 726 assert_not_impl!(Flush<'_, *const ()>: Send); 727 assert_impl!(Flush<'_, ()>: Sync); 728 assert_not_impl!(Flush<'_, *const ()>: Sync); 729 assert_impl!(Flush<'_, ()>: Unpin); 730 assert_not_impl!(Flush<'_, PhantomPinned>: Unpin); 731 732 assert_impl!(IntoSink<(), ()>: Send); 733 assert_not_impl!(IntoSink<(), *const ()>: Send); 734 assert_not_impl!(IntoSink<*const (), ()>: Send); 735 assert_impl!(IntoSink<(), ()>: Sync); 736 assert_not_impl!(IntoSink<(), *const ()>: Sync); 737 assert_not_impl!(IntoSink<*const (), ()>: Sync); 738 assert_impl!(IntoSink<(), PhantomPinned>: Unpin); 739 assert_not_impl!(IntoSink<PhantomPinned, ()>: Unpin); 740 741 assert_impl!(Lines<()>: Send); 742 assert_not_impl!(Lines<*const ()>: Send); 743 assert_impl!(Lines<()>: Sync); 744 assert_not_impl!(Lines<*const ()>: Sync); 745 assert_impl!(Lines<()>: Unpin); 746 assert_not_impl!(Lines<PhantomPinned>: Unpin); 747 748 assert_impl!(Read<'_, ()>: Send); 749 assert_not_impl!(Read<'_, *const ()>: Send); 750 assert_impl!(Read<'_, ()>: Sync); 751 assert_not_impl!(Read<'_, *const ()>: Sync); 752 assert_impl!(Read<'_, ()>: Unpin); 753 assert_not_impl!(Read<'_, PhantomPinned>: Unpin); 754 755 assert_impl!(ReadExact<'_, ()>: Send); 756 assert_not_impl!(ReadExact<'_, *const ()>: Send); 757 assert_impl!(ReadExact<'_, ()>: Sync); 758 assert_not_impl!(ReadExact<'_, *const ()>: Sync); 759 assert_impl!(ReadExact<'_, ()>: Unpin); 760 assert_not_impl!(ReadExact<'_, PhantomPinned>: Unpin); 761 762 assert_impl!(ReadHalf<()>: Send); 763 assert_not_impl!(ReadHalf<*const ()>: Send); 764 assert_impl!(ReadHalf<()>: Sync); 765 assert_not_impl!(ReadHalf<*const ()>: Sync); 766 assert_impl!(ReadHalf<PhantomPinned>: Unpin); 767 768 assert_impl!(ReadLine<'_, ()>: Send); 769 assert_not_impl!(ReadLine<'_, *const ()>: Send); 770 assert_impl!(ReadLine<'_, ()>: Sync); 771 assert_not_impl!(ReadLine<'_, *const ()>: Sync); 772 assert_impl!(ReadLine<'_, ()>: Unpin); 773 assert_not_impl!(ReadLine<'_, PhantomPinned>: Unpin); 774 775 assert_impl!(ReadToEnd<'_, ()>: Send); 776 assert_not_impl!(ReadToEnd<'_, *const ()>: Send); 777 assert_impl!(ReadToEnd<'_, ()>: Sync); 778 assert_not_impl!(ReadToEnd<'_, *const ()>: Sync); 779 assert_impl!(ReadToEnd<'_, ()>: Unpin); 780 assert_not_impl!(ReadToEnd<'_, PhantomPinned>: Unpin); 781 782 assert_impl!(ReadToString<'_, ()>: Send); 783 assert_not_impl!(ReadToString<'_, *const ()>: Send); 784 assert_impl!(ReadToString<'_, ()>: Sync); 785 assert_not_impl!(ReadToString<'_, *const ()>: Sync); 786 assert_impl!(ReadToString<'_, ()>: Unpin); 787 assert_not_impl!(ReadToString<'_, PhantomPinned>: Unpin); 788 789 assert_impl!(ReadUntil<'_, ()>: Send); 790 assert_not_impl!(ReadUntil<'_, *const ()>: Send); 791 assert_impl!(ReadUntil<'_, ()>: Sync); 792 assert_not_impl!(ReadUntil<'_, *const ()>: Sync); 793 assert_impl!(ReadUntil<'_, ()>: Unpin); 794 assert_not_impl!(ReadUntil<'_, PhantomPinned>: Unpin); 795 796 assert_impl!(ReadVectored<'_, ()>: Send); 797 assert_not_impl!(ReadVectored<'_, *const ()>: Send); 798 assert_impl!(ReadVectored<'_, ()>: Sync); 799 assert_not_impl!(ReadVectored<'_, *const ()>: Sync); 800 assert_impl!(ReadVectored<'_, ()>: Unpin); 801 assert_not_impl!(ReadVectored<'_, PhantomPinned>: Unpin); 802 803 assert_impl!(Repeat: Send); 804 assert_impl!(Repeat: Sync); 805 assert_impl!(Repeat: Unpin); 806 807 assert_impl!(ReuniteError<()>: Send); 808 assert_not_impl!(ReuniteError<*const ()>: Send); 809 assert_impl!(ReuniteError<()>: Sync); 810 assert_not_impl!(ReuniteError<*const ()>: Sync); 811 assert_impl!(ReuniteError<PhantomPinned>: Unpin); 812 813 assert_impl!(Seek<'_, ()>: Send); 814 assert_not_impl!(Seek<'_, *const ()>: Send); 815 assert_impl!(Seek<'_, ()>: Sync); 816 assert_not_impl!(Seek<'_, *const ()>: Sync); 817 assert_impl!(Seek<'_, ()>: Unpin); 818 assert_not_impl!(Seek<'_, PhantomPinned>: Unpin); 819 820 assert_impl!(SeeKRelative<'_, ()>: Send); 821 assert_not_impl!(SeeKRelative<'_, *const ()>: Send); 822 assert_impl!(SeeKRelative<'_, ()>: Sync); 823 assert_not_impl!(SeeKRelative<'_, *const ()>: Sync); 824 assert_impl!(SeeKRelative<'_, PhantomPinned>: Unpin); 825 826 assert_impl!(Sink: Send); 827 assert_impl!(Sink: Sync); 828 assert_impl!(Sink: Unpin); 829 830 assert_impl!(Take<()>: Send); 831 assert_not_impl!(Take<*const ()>: Send); 832 assert_impl!(Take<()>: Sync); 833 assert_not_impl!(Take<*const ()>: Sync); 834 assert_impl!(Take<()>: Unpin); 835 assert_not_impl!(Take<PhantomPinned>: Unpin); 836 837 assert_impl!(Window<()>: Send); 838 assert_not_impl!(Window<*const ()>: Send); 839 assert_impl!(Window<()>: Sync); 840 assert_not_impl!(Window<*const ()>: Sync); 841 assert_impl!(Window<()>: Unpin); 842 assert_not_impl!(Window<PhantomPinned>: Unpin); 843 844 assert_impl!(Write<'_, ()>: Send); 845 assert_not_impl!(Write<'_, *const ()>: Send); 846 assert_impl!(Write<'_, ()>: Sync); 847 assert_not_impl!(Write<'_, *const ()>: Sync); 848 assert_impl!(Write<'_, ()>: Unpin); 849 assert_not_impl!(Write<'_, PhantomPinned>: Unpin); 850 851 assert_impl!(WriteAll<'_, ()>: Send); 852 assert_not_impl!(WriteAll<'_, *const ()>: Send); 853 assert_impl!(WriteAll<'_, ()>: Sync); 854 assert_not_impl!(WriteAll<'_, *const ()>: Sync); 855 assert_impl!(WriteAll<'_, ()>: Unpin); 856 assert_not_impl!(WriteAll<'_, PhantomPinned>: Unpin); 857 858 #[cfg(feature = "write-all-vectored")] 859 assert_impl!(WriteAllVectored<'_, ()>: Send); 860 #[cfg(feature = "write-all-vectored")] 861 assert_not_impl!(WriteAllVectored<'_, *const ()>: Send); 862 #[cfg(feature = "write-all-vectored")] 863 assert_impl!(WriteAllVectored<'_, ()>: Sync); 864 #[cfg(feature = "write-all-vectored")] 865 assert_not_impl!(WriteAllVectored<'_, *const ()>: Sync); 866 #[cfg(feature = "write-all-vectored")] 867 assert_impl!(WriteAllVectored<'_, ()>: Unpin); 868 // WriteAllVectored requires `W: Unpin` 869 // #[cfg(feature = "write-all-vectored")] 870 // assert_not_impl!(WriteAllVectored<'_, PhantomPinned>: Unpin); 871 872 assert_impl!(WriteHalf<()>: Send); 873 assert_not_impl!(WriteHalf<*const ()>: Send); 874 assert_impl!(WriteHalf<()>: Sync); 875 assert_not_impl!(WriteHalf<*const ()>: Sync); 876 assert_impl!(WriteHalf<PhantomPinned>: Unpin); 877 878 assert_impl!(WriteVectored<'_, ()>: Send); 879 assert_not_impl!(WriteVectored<'_, *const ()>: Send); 880 assert_impl!(WriteVectored<'_, ()>: Sync); 881 assert_not_impl!(WriteVectored<'_, *const ()>: Sync); 882 assert_impl!(WriteVectored<'_, ()>: Unpin); 883 assert_not_impl!(WriteVectored<'_, PhantomPinned>: Unpin); 884 } 885 886 /// Assert Send/Sync/Unpin for all public types in `futures::lock`. 887 pub mod lock { 888 use super::*; 889 use futures::lock::*; 890 891 #[cfg(feature = "bilock")] 892 assert_impl!(BiLock<()>: Send); 893 #[cfg(feature = "bilock")] 894 assert_not_impl!(BiLock<*const ()>: Send); 895 #[cfg(feature = "bilock")] 896 assert_impl!(BiLock<()>: Sync); 897 #[cfg(feature = "bilock")] 898 assert_not_impl!(BiLock<*const ()>: Sync); 899 #[cfg(feature = "bilock")] 900 assert_impl!(BiLock<PhantomPinned>: Unpin); 901 902 #[cfg(feature = "bilock")] 903 assert_impl!(BiLockAcquire<'_, ()>: Send); 904 #[cfg(feature = "bilock")] 905 assert_not_impl!(BiLockAcquire<'_, *const ()>: Send); 906 #[cfg(feature = "bilock")] 907 assert_impl!(BiLockAcquire<'_, ()>: Sync); 908 #[cfg(feature = "bilock")] 909 assert_not_impl!(BiLockAcquire<'_, *const ()>: Sync); 910 #[cfg(feature = "bilock")] 911 assert_impl!(BiLockAcquire<'_, PhantomPinned>: Unpin); 912 913 #[cfg(feature = "bilock")] 914 assert_impl!(BiLockGuard<'_, ()>: Send); 915 #[cfg(feature = "bilock")] 916 assert_not_impl!(BiLockGuard<'_, *const ()>: Send); 917 #[cfg(feature = "bilock")] 918 assert_impl!(BiLockGuard<'_, ()>: Sync); 919 #[cfg(feature = "bilock")] 920 assert_not_impl!(BiLockGuard<'_, *const ()>: Sync); 921 #[cfg(feature = "bilock")] 922 assert_impl!(BiLockGuard<'_, PhantomPinned>: Unpin); 923 924 assert_impl!(MappedMutexGuard<'_, (), ()>: Send); 925 assert_not_impl!(MappedMutexGuard<'_, (), *const ()>: Send); 926 assert_not_impl!(MappedMutexGuard<'_, *const (), ()>: Send); 927 assert_impl!(MappedMutexGuard<'_, (), ()>: Sync); 928 assert_not_impl!(MappedMutexGuard<'_, (), *const ()>: Sync); 929 assert_not_impl!(MappedMutexGuard<'_, *const (), ()>: Sync); 930 assert_impl!(MappedMutexGuard<'_, PhantomPinned, PhantomPinned>: Unpin); 931 932 assert_impl!(Mutex<()>: Send); 933 assert_not_impl!(Mutex<*const ()>: Send); 934 assert_impl!(Mutex<()>: Sync); 935 assert_not_impl!(Mutex<*const ()>: Sync); 936 assert_impl!(Mutex<()>: Unpin); 937 assert_not_impl!(Mutex<PhantomPinned>: Unpin); 938 939 assert_impl!(MutexGuard<'_, ()>: Send); 940 assert_not_impl!(MutexGuard<'_, *const ()>: Send); 941 assert_impl!(MutexGuard<'_, ()>: Sync); 942 assert_not_impl!(MutexGuard<'_, *const ()>: Sync); 943 assert_impl!(MutexGuard<'_, PhantomPinned>: Unpin); 944 945 assert_impl!(MutexLockFuture<'_, ()>: Send); 946 assert_not_impl!(MutexLockFuture<'_, *const ()>: Send); 947 assert_impl!(MutexLockFuture<'_, *const ()>: Sync); 948 assert_impl!(MutexLockFuture<'_, PhantomPinned>: Unpin); 949 950 #[cfg(feature = "bilock")] 951 assert_impl!(ReuniteError<()>: Send); 952 #[cfg(feature = "bilock")] 953 assert_not_impl!(ReuniteError<*const ()>: Send); 954 #[cfg(feature = "bilock")] 955 assert_impl!(ReuniteError<()>: Sync); 956 #[cfg(feature = "bilock")] 957 assert_not_impl!(ReuniteError<*const ()>: Sync); 958 #[cfg(feature = "bilock")] 959 assert_impl!(ReuniteError<PhantomPinned>: Unpin); 960 } 961 962 /// Assert Send/Sync/Unpin for all public types in `futures::sink`. 963 pub mod sink { 964 use super::*; 965 use futures::sink::{self, *}; 966 use std::marker::Send; 967 968 assert_impl!(Buffer<(), ()>: Send); 969 assert_not_impl!(Buffer<(), *const ()>: Send); 970 assert_not_impl!(Buffer<*const (), ()>: Send); 971 assert_impl!(Buffer<(), ()>: Sync); 972 assert_not_impl!(Buffer<(), *const ()>: Sync); 973 assert_not_impl!(Buffer<*const (), ()>: Sync); 974 assert_impl!(Buffer<(), PhantomPinned>: Unpin); 975 assert_not_impl!(Buffer<PhantomPinned, ()>: Unpin); 976 977 assert_impl!(Close<'_, (), *const ()>: Send); 978 assert_not_impl!(Close<'_, *const (), ()>: Send); 979 assert_impl!(Close<'_, (), *const ()>: Sync); 980 assert_not_impl!(Close<'_, *const (), ()>: Sync); 981 assert_impl!(Close<'_, (), PhantomPinned>: Unpin); 982 assert_not_impl!(Close<'_, PhantomPinned, ()>: Unpin); 983 984 assert_impl!(Drain<()>: Send); 985 assert_not_impl!(Drain<*const ()>: Send); 986 assert_impl!(Drain<()>: Sync); 987 assert_not_impl!(Drain<*const ()>: Sync); 988 assert_impl!(Drain<PhantomPinned>: Unpin); 989 990 assert_impl!(Fanout<(), ()>: Send); 991 assert_not_impl!(Fanout<(), *const ()>: Send); 992 assert_not_impl!(Fanout<*const (), ()>: Send); 993 assert_impl!(Fanout<(), ()>: Sync); 994 assert_not_impl!(Fanout<(), *const ()>: Sync); 995 assert_not_impl!(Fanout<*const (), ()>: Sync); 996 assert_impl!(Fanout<(), ()>: Unpin); 997 assert_not_impl!(Fanout<(), PhantomPinned>: Unpin); 998 assert_not_impl!(Fanout<PhantomPinned, ()>: Unpin); 999 1000 assert_impl!(Feed<'_, (), ()>: Send); 1001 assert_not_impl!(Feed<'_, (), *const ()>: Send); 1002 assert_not_impl!(Feed<'_, *const (), ()>: Send); 1003 assert_impl!(Feed<'_, (), ()>: Sync); 1004 assert_not_impl!(Feed<'_, (), *const ()>: Sync); 1005 assert_not_impl!(Feed<'_, *const (), ()>: Sync); 1006 assert_impl!(Feed<'_, (), PhantomPinned>: Unpin); 1007 assert_not_impl!(Feed<'_, PhantomPinned, ()>: Unpin); 1008 1009 assert_impl!(Flush<'_, (), *const ()>: Send); 1010 assert_not_impl!(Flush<'_, *const (), ()>: Send); 1011 assert_impl!(Flush<'_, (), *const ()>: Sync); 1012 assert_not_impl!(Flush<'_, *const (), ()>: Sync); 1013 assert_impl!(Flush<'_, (), PhantomPinned>: Unpin); 1014 assert_not_impl!(Flush<'_, PhantomPinned, ()>: Unpin); 1015 1016 assert_impl!(sink::Send<'_, (), ()>: Send); 1017 assert_not_impl!(sink::Send<'_, (), *const ()>: Send); 1018 assert_not_impl!(sink::Send<'_, *const (), ()>: Send); 1019 assert_impl!(sink::Send<'_, (), ()>: Sync); 1020 assert_not_impl!(sink::Send<'_, (), *const ()>: Sync); 1021 assert_not_impl!(sink::Send<'_, *const (), ()>: Sync); 1022 assert_impl!(sink::Send<'_, (), PhantomPinned>: Unpin); 1023 assert_not_impl!(sink::Send<'_, PhantomPinned, ()>: Unpin); 1024 1025 assert_impl!(SendAll<'_, (), SendTryStream<()>>: Send); 1026 assert_not_impl!(SendAll<'_, (), SendTryStream>: Send); 1027 assert_not_impl!(SendAll<'_, (), LocalTryStream>: Send); 1028 assert_not_impl!(SendAll<'_, *const (), SendTryStream<()>>: Send); 1029 assert_impl!(SendAll<'_, (), SyncTryStream<()>>: Sync); 1030 assert_not_impl!(SendAll<'_, (), SyncTryStream>: Sync); 1031 assert_not_impl!(SendAll<'_, (), LocalTryStream>: Sync); 1032 assert_not_impl!(SendAll<'_, *const (), SyncTryStream<()>>: Sync); 1033 assert_impl!(SendAll<'_, (), UnpinTryStream>: Unpin); 1034 assert_not_impl!(SendAll<'_, PhantomPinned, UnpinTryStream>: Unpin); 1035 assert_not_impl!(SendAll<'_, (), PinnedTryStream>: Unpin); 1036 1037 assert_impl!(SinkErrInto<SendSink, *const (), *const ()>: Send); 1038 assert_not_impl!(SinkErrInto<LocalSink<()>, (), ()>: Send); 1039 assert_impl!(SinkErrInto<SyncSink, *const (), *const ()>: Sync); 1040 assert_not_impl!(SinkErrInto<LocalSink<()>, (), ()>: Sync); 1041 assert_impl!(SinkErrInto<UnpinSink, PhantomPinned, PhantomPinned>: Unpin); 1042 assert_not_impl!(SinkErrInto<PinnedSink<()>, (), ()>: Unpin); 1043 1044 assert_impl!(SinkMapErr<SendSink, ()>: Send); 1045 assert_not_impl!(SinkMapErr<SendSink, *const ()>: Send); 1046 assert_not_impl!(SinkMapErr<LocalSink<()>, ()>: Send); 1047 assert_impl!(SinkMapErr<SyncSink, ()>: Sync); 1048 assert_not_impl!(SinkMapErr<SyncSink, *const ()>: Sync); 1049 assert_not_impl!(SinkMapErr<LocalSink<()>, ()>: Sync); 1050 assert_impl!(SinkMapErr<UnpinSink, PhantomPinned>: Unpin); 1051 assert_not_impl!(SinkMapErr<PinnedSink<()>, ()>: Unpin); 1052 1053 assert_impl!(Unfold<(), (), ()>: Send); 1054 assert_not_impl!(Unfold<*const (), (), ()>: Send); 1055 assert_not_impl!(Unfold<(), *const (), ()>: Send); 1056 assert_not_impl!(Unfold<(), (), *const ()>: Send); 1057 assert_impl!(Unfold<(), (), ()>: Sync); 1058 assert_not_impl!(Unfold<*const (), (), ()>: Sync); 1059 assert_not_impl!(Unfold<(), *const (), ()>: Sync); 1060 assert_not_impl!(Unfold<(), (), *const ()>: Sync); 1061 assert_impl!(Unfold<PhantomPinned, PhantomPinned, ()>: Unpin); 1062 assert_not_impl!(Unfold<PinnedSink<()>, (), PhantomPinned>: Unpin); 1063 1064 assert_impl!(With<(), *const (), *const (), (), ()>: Send); 1065 assert_not_impl!(With<*const (), (), (), (), ()>: Send); 1066 assert_not_impl!(With<(), (), (), *const (), ()>: Send); 1067 assert_not_impl!(With<(), (), (), (), *const ()>: Send); 1068 assert_impl!(With<(), *const (), *const (), (), ()>: Sync); 1069 assert_not_impl!(With<*const (), (), (), (), ()>: Sync); 1070 assert_not_impl!(With<(), (), (), *const (), ()>: Sync); 1071 assert_not_impl!(With<(), (), (), (), *const ()>: Sync); 1072 assert_impl!(With<(), PhantomPinned, PhantomPinned, (), PhantomPinned>: Unpin); 1073 assert_not_impl!(With<PhantomPinned, (), (), (), ()>: Unpin); 1074 assert_not_impl!(With<(), (), (), PhantomPinned, ()>: Unpin); 1075 1076 assert_impl!(WithFlatMap<(), (), *const (), (), ()>: Send); 1077 assert_not_impl!(WithFlatMap<*const (), (), (), (), ()>: Send); 1078 assert_not_impl!(WithFlatMap<(), *const (), (), (), ()>: Send); 1079 assert_not_impl!(WithFlatMap<(), (), (), *const (), ()>: Send); 1080 assert_not_impl!(WithFlatMap<(), (), (), (), *const ()>: Send); 1081 assert_impl!(WithFlatMap<(), (), *const (), (), ()>: Sync); 1082 assert_not_impl!(WithFlatMap<*const (), (), (), (), ()>: Sync); 1083 assert_not_impl!(WithFlatMap<(), *const (), (), (), ()>: Sync); 1084 assert_not_impl!(WithFlatMap<(), (), (), *const (), ()>: Sync); 1085 assert_not_impl!(WithFlatMap<(), (), (), (), *const ()>: Sync); 1086 assert_impl!(WithFlatMap<(), PhantomPinned, PhantomPinned, (), PhantomPinned>: Unpin); 1087 assert_not_impl!(WithFlatMap<PhantomPinned, (), (), (), ()>: Unpin); 1088 assert_not_impl!(WithFlatMap<(), (), (), PhantomPinned, ()>: Unpin); 1089 } 1090 1091 /// Assert Send/Sync/Unpin for all public types in `futures::stream`. 1092 pub mod stream { 1093 use super::*; 1094 use futures::{io, stream::*}; 1095 1096 assert_impl!(AndThen<(), (), ()>: Send); 1097 assert_not_impl!(AndThen<*const (), (), ()>: Send); 1098 assert_not_impl!(AndThen<(), *const (), ()>: Send); 1099 assert_not_impl!(AndThen<(), (), *const ()>: Send); 1100 assert_impl!(AndThen<(), (), ()>: Sync); 1101 assert_not_impl!(AndThen<*const (), (), ()>: Sync); 1102 assert_not_impl!(AndThen<(), *const (), ()>: Sync); 1103 assert_not_impl!(AndThen<(), (), *const ()>: Sync); 1104 assert_impl!(AndThen<(), (), PhantomPinned>: Unpin); 1105 assert_not_impl!(AndThen<PhantomPinned, (), ()>: Unpin); 1106 assert_not_impl!(AndThen<(), PhantomPinned, ()>: Unpin); 1107 1108 assert_impl!(BufferUnordered<SendStream<()>>: Send); 1109 assert_not_impl!(BufferUnordered<SendStream>: Send); 1110 assert_not_impl!(BufferUnordered<LocalStream>: Send); 1111 assert_impl!(BufferUnordered<SyncStream<()>>: Sync); 1112 assert_not_impl!(BufferUnordered<SyncStream>: Sync); 1113 assert_not_impl!(BufferUnordered<LocalStream>: Sync); 1114 assert_impl!(BufferUnordered<UnpinStream>: Unpin); 1115 assert_not_impl!(BufferUnordered<PinnedStream>: Unpin); 1116 1117 assert_impl!(Buffered<SendStream<SendFuture<()>>>: Send); 1118 assert_not_impl!(Buffered<SendStream<SendFuture>>: Send); 1119 assert_not_impl!(Buffered<SendStream<LocalFuture>>: Send); 1120 assert_not_impl!(Buffered<LocalStream<SendFuture<()>>>: Send); 1121 assert_impl!(Buffered<SyncStream<SyncFuture<()>>>: Sync); 1122 assert_not_impl!(Buffered<SyncStream<SyncFuture>>: Sync); 1123 assert_not_impl!(Buffered<SyncStream<LocalFuture>>: Sync); 1124 assert_not_impl!(Buffered<LocalStream<SyncFuture<()>>>: Sync); 1125 assert_impl!(Buffered<UnpinStream<PinnedFuture>>: Unpin); 1126 assert_not_impl!(Buffered<PinnedStream<PinnedFuture>>: Unpin); 1127 1128 assert_impl!(CatchUnwind<SendStream>: Send); 1129 assert_not_impl!(CatchUnwind<LocalStream>: Send); 1130 assert_impl!(CatchUnwind<SyncStream>: Sync); 1131 assert_not_impl!(CatchUnwind<LocalStream>: Sync); 1132 assert_impl!(CatchUnwind<UnpinStream>: Unpin); 1133 assert_not_impl!(CatchUnwind<PinnedStream>: Unpin); 1134 1135 assert_impl!(Chain<(), ()>: Send); 1136 assert_not_impl!(Chain<(), *const ()>: Send); 1137 assert_not_impl!(Chain<*const (), ()>: Send); 1138 assert_impl!(Chain<(), ()>: Sync); 1139 assert_not_impl!(Chain<(), *const ()>: Sync); 1140 assert_not_impl!(Chain<*const (), ()>: Sync); 1141 assert_impl!(Chain<(), ()>: Unpin); 1142 assert_not_impl!(Chain<(), PhantomPinned>: Unpin); 1143 assert_not_impl!(Chain<PhantomPinned, ()>: Unpin); 1144 1145 assert_impl!(Chunks<SendStream<()>>: Send); 1146 assert_not_impl!(Chunks<SendStream>: Send); 1147 assert_not_impl!(Chunks<LocalStream>: Send); 1148 assert_impl!(Chunks<SyncStream<()>>: Sync); 1149 assert_not_impl!(Chunks<SyncStream>: Sync); 1150 assert_not_impl!(Chunks<LocalStream>: Sync); 1151 assert_impl!(Chunks<UnpinStream>: Unpin); 1152 assert_not_impl!(Chunks<PinnedStream>: Unpin); 1153 1154 assert_impl!(Collect<(), ()>: Send); 1155 assert_not_impl!(Collect<*const (), ()>: Send); 1156 assert_not_impl!(Collect<(), *const ()>: Send); 1157 assert_impl!(Collect<(), ()>: Sync); 1158 assert_not_impl!(Collect<*const (), ()>: Sync); 1159 assert_not_impl!(Collect<(), *const ()>: Sync); 1160 assert_impl!(Collect<(), PhantomPinned>: Unpin); 1161 assert_not_impl!(Collect<PhantomPinned, ()>: Unpin); 1162 1163 assert_impl!(Concat<SendStream<()>>: Send); 1164 assert_not_impl!(Concat<SendStream>: Send); 1165 assert_not_impl!(Concat<LocalStream>: Send); 1166 assert_impl!(Concat<SyncStream<()>>: Sync); 1167 assert_not_impl!(Concat<SyncStream>: Sync); 1168 assert_not_impl!(Concat<LocalStream>: Sync); 1169 assert_impl!(Concat<UnpinStream>: Unpin); 1170 assert_not_impl!(Concat<PinnedStream>: Unpin); 1171 1172 assert_impl!(Cycle<()>: Send); 1173 assert_not_impl!(Cycle<*const ()>: Send); 1174 assert_impl!(Cycle<()>: Sync); 1175 assert_not_impl!(Cycle<*const ()>: Sync); 1176 assert_impl!(Cycle<()>: Unpin); 1177 assert_not_impl!(Cycle<PhantomPinned>: Unpin); 1178 1179 assert_impl!(Empty<()>: Send); 1180 assert_not_impl!(Empty<*const ()>: Send); 1181 assert_impl!(Empty<()>: Sync); 1182 assert_not_impl!(Empty<*const ()>: Sync); 1183 assert_impl!(Empty<PhantomPinned>: Unpin); 1184 1185 assert_impl!(Enumerate<()>: Send); 1186 assert_not_impl!(Enumerate<*const ()>: Send); 1187 assert_impl!(Enumerate<()>: Sync); 1188 assert_not_impl!(Enumerate<*const ()>: Sync); 1189 assert_impl!(Enumerate<()>: Unpin); 1190 assert_not_impl!(Enumerate<PhantomPinned>: Unpin); 1191 1192 assert_impl!(ErrInto<(), *const ()>: Send); 1193 assert_not_impl!(ErrInto<*const (), ()>: Send); 1194 assert_impl!(ErrInto<(), *const ()>: Sync); 1195 assert_not_impl!(ErrInto<*const (), ()>: Sync); 1196 assert_impl!(ErrInto<(), PhantomPinned>: Unpin); 1197 assert_not_impl!(ErrInto<PhantomPinned, ()>: Unpin); 1198 1199 assert_impl!(Filter<SendStream<()>, (), ()>: Send); 1200 assert_not_impl!(Filter<LocalStream<()>, (), ()>: Send); 1201 assert_not_impl!(Filter<SendStream, (), ()>: Send); 1202 assert_not_impl!(Filter<SendStream<()>, *const (), ()>: Send); 1203 assert_not_impl!(Filter<SendStream<()>, (), *const ()>: Send); 1204 assert_impl!(Filter<SyncStream<()>, (), ()>: Sync); 1205 assert_not_impl!(Filter<LocalStream<()>, (), ()>: Sync); 1206 assert_not_impl!(Filter<SyncStream, (), ()>: Sync); 1207 assert_not_impl!(Filter<SyncStream<()>, *const (), ()>: Sync); 1208 assert_not_impl!(Filter<SyncStream<()>, (), *const ()>: Sync); 1209 assert_impl!(Filter<UnpinStream, (), PhantomPinned>: Unpin); 1210 assert_not_impl!(Filter<PinnedStream, (), ()>: Unpin); 1211 assert_not_impl!(Filter<UnpinStream, PhantomPinned, ()>: Unpin); 1212 1213 assert_impl!(FilterMap<(), (), ()>: Send); 1214 assert_not_impl!(FilterMap<*const (), (), ()>: Send); 1215 assert_not_impl!(FilterMap<(), *const (), ()>: Send); 1216 assert_not_impl!(FilterMap<(), (), *const ()>: Send); 1217 assert_impl!(FilterMap<(), (), ()>: Sync); 1218 assert_not_impl!(FilterMap<*const (), (), ()>: Sync); 1219 assert_not_impl!(FilterMap<(), *const (), ()>: Sync); 1220 assert_not_impl!(FilterMap<(), (), *const ()>: Sync); 1221 assert_impl!(FilterMap<(), (), PhantomPinned>: Unpin); 1222 assert_not_impl!(FilterMap<PhantomPinned, (), ()>: Unpin); 1223 assert_not_impl!(FilterMap<(), PhantomPinned, ()>: Unpin); 1224 1225 assert_impl!(FlatMap<(), (), ()>: Send); 1226 assert_not_impl!(FlatMap<*const (), (), ()>: Send); 1227 assert_not_impl!(FlatMap<(), *const (), ()>: Send); 1228 assert_not_impl!(FlatMap<(), (), *const ()>: Send); 1229 assert_impl!(FlatMap<(), (), ()>: Sync); 1230 assert_not_impl!(FlatMap<*const (), (), ()>: Sync); 1231 assert_not_impl!(FlatMap<(), *const (), ()>: Sync); 1232 assert_not_impl!(FlatMap<(), (), *const ()>: Sync); 1233 assert_impl!(FlatMap<(), (), PhantomPinned>: Unpin); 1234 assert_not_impl!(FlatMap<PhantomPinned, (), ()>: Unpin); 1235 assert_not_impl!(FlatMap<(), PhantomPinned, ()>: Unpin); 1236 1237 assert_impl!(Flatten<SendStream<()>>: Send); 1238 assert_not_impl!(Flatten<SendStream>: Send); 1239 assert_not_impl!(Flatten<SendStream>: Send); 1240 assert_impl!(Flatten<SyncStream<()>>: Sync); 1241 assert_not_impl!(Flatten<LocalStream<()>>: Sync); 1242 assert_not_impl!(Flatten<LocalStream<()>>: Sync); 1243 assert_impl!(Flatten<UnpinStream<()>>: Unpin); 1244 assert_not_impl!(Flatten<UnpinStream>: Unpin); 1245 assert_not_impl!(Flatten<PinnedStream>: Unpin); 1246 1247 assert_impl!(Fold<(), (), (), ()>: Send); 1248 assert_not_impl!(Fold<*const (), (), (), ()>: Send); 1249 assert_not_impl!(Fold<(), *const (), (), ()>: Send); 1250 assert_not_impl!(Fold<(), (), *const (), ()>: Send); 1251 assert_not_impl!(Fold<(), (), (), *const ()>: Send); 1252 assert_impl!(Fold<(), (), (), ()>: Sync); 1253 assert_not_impl!(Fold<*const (), (), (), ()>: Sync); 1254 assert_not_impl!(Fold<(), *const (), (), ()>: Sync); 1255 assert_not_impl!(Fold<(), (), *const (), ()>: Sync); 1256 assert_not_impl!(Fold<(), (), (), *const ()>: Sync); 1257 assert_impl!(Fold<(), (), PhantomPinned, PhantomPinned>: Unpin); 1258 assert_not_impl!(Fold<PhantomPinned, (), (), ()>: Unpin); 1259 assert_not_impl!(Fold<(), PhantomPinned, (), ()>: Unpin); 1260 1261 assert_impl!(ForEach<(), (), ()>: Send); 1262 assert_not_impl!(ForEach<*const (), (), ()>: Send); 1263 assert_not_impl!(ForEach<(), *const (), ()>: Send); 1264 assert_not_impl!(ForEach<(), (), *const ()>: Send); 1265 assert_impl!(ForEach<(), (), ()>: Sync); 1266 assert_not_impl!(ForEach<*const (), (), ()>: Sync); 1267 assert_not_impl!(ForEach<(), *const (), ()>: Sync); 1268 assert_not_impl!(ForEach<(), (), *const ()>: Sync); 1269 assert_impl!(ForEach<(), (), PhantomPinned>: Unpin); 1270 assert_not_impl!(ForEach<PhantomPinned, (), ()>: Unpin); 1271 assert_not_impl!(ForEach<(), PhantomPinned, ()>: Unpin); 1272 1273 assert_impl!(ForEachConcurrent<(), (), ()>: Send); 1274 assert_not_impl!(ForEachConcurrent<*const (), (), ()>: Send); 1275 assert_not_impl!(ForEachConcurrent<(), *const (), ()>: Send); 1276 assert_not_impl!(ForEachConcurrent<(), (), *const ()>: Send); 1277 assert_impl!(ForEachConcurrent<(), (), ()>: Sync); 1278 assert_not_impl!(ForEachConcurrent<*const (), (), ()>: Sync); 1279 assert_not_impl!(ForEachConcurrent<(), *const (), ()>: Sync); 1280 assert_not_impl!(ForEachConcurrent<(), (), *const ()>: Sync); 1281 assert_impl!(ForEachConcurrent<(), PhantomPinned, PhantomPinned>: Unpin); 1282 assert_not_impl!(ForEachConcurrent<PhantomPinned, (), ()>: Unpin); 1283 1284 assert_impl!(Forward<SendTryStream<()>, ()>: Send); 1285 assert_not_impl!(Forward<SendTryStream, ()>: Send); 1286 assert_not_impl!(Forward<SendTryStream<()>, *const ()>: Send); 1287 assert_not_impl!(Forward<LocalTryStream, ()>: Send); 1288 assert_impl!(Forward<SyncTryStream<()>, ()>: Sync); 1289 assert_not_impl!(Forward<SyncTryStream, ()>: Sync); 1290 assert_not_impl!(Forward<SyncTryStream<()>, *const ()>: Sync); 1291 assert_not_impl!(Forward<LocalTryStream, ()>: Sync); 1292 assert_impl!(Forward<UnpinTryStream, ()>: Unpin); 1293 assert_not_impl!(Forward<UnpinTryStream, PhantomPinned>: Unpin); 1294 assert_not_impl!(Forward<PinnedTryStream, ()>: Unpin); 1295 1296 assert_impl!(Fuse<()>: Send); 1297 assert_not_impl!(Fuse<*const ()>: Send); 1298 assert_impl!(Fuse<()>: Sync); 1299 assert_not_impl!(Fuse<*const ()>: Sync); 1300 assert_impl!(Fuse<()>: Unpin); 1301 assert_not_impl!(Fuse<PhantomPinned>: Unpin); 1302 1303 assert_impl!(FuturesOrdered<SendFuture<()>>: Send); 1304 assert_not_impl!(FuturesOrdered<SendFuture>: Send); 1305 assert_not_impl!(FuturesOrdered<SendFuture>: Send); 1306 assert_impl!(FuturesOrdered<SyncFuture<()>>: Sync); 1307 assert_not_impl!(FuturesOrdered<LocalFuture<()>>: Sync); 1308 assert_not_impl!(FuturesOrdered<LocalFuture<()>>: Sync); 1309 assert_impl!(FuturesOrdered<PinnedFuture>: Unpin); 1310 1311 assert_impl!(FuturesUnordered<()>: Send); 1312 assert_not_impl!(FuturesUnordered<*const ()>: Send); 1313 assert_impl!(FuturesUnordered<()>: Sync); 1314 assert_not_impl!(FuturesUnordered<*const ()>: Sync); 1315 assert_impl!(FuturesUnordered<PhantomPinned>: Unpin); 1316 1317 assert_impl!(Inspect<(), ()>: Send); 1318 assert_not_impl!(Inspect<*const (), ()>: Send); 1319 assert_not_impl!(Inspect<(), *const ()>: Send); 1320 assert_impl!(Inspect<(), ()>: Sync); 1321 assert_not_impl!(Inspect<*const (), ()>: Sync); 1322 assert_not_impl!(Inspect<(), *const ()>: Sync); 1323 assert_impl!(Inspect<(), PhantomPinned>: Unpin); 1324 assert_not_impl!(Inspect<PhantomPinned, ()>: Unpin); 1325 1326 assert_impl!(InspectErr<(), ()>: Send); 1327 assert_not_impl!(InspectErr<*const (), ()>: Send); 1328 assert_not_impl!(InspectErr<(), *const ()>: Send); 1329 assert_impl!(InspectErr<(), ()>: Sync); 1330 assert_not_impl!(InspectErr<*const (), ()>: Sync); 1331 assert_not_impl!(InspectErr<(), *const ()>: Sync); 1332 assert_impl!(InspectErr<(), PhantomPinned>: Unpin); 1333 assert_not_impl!(InspectErr<PhantomPinned, ()>: Unpin); 1334 1335 assert_impl!(InspectOk<(), ()>: Send); 1336 assert_not_impl!(InspectOk<*const (), ()>: Send); 1337 assert_not_impl!(InspectOk<(), *const ()>: Send); 1338 assert_impl!(InspectOk<(), ()>: Sync); 1339 assert_not_impl!(InspectOk<*const (), ()>: Sync); 1340 assert_not_impl!(InspectOk<(), *const ()>: Sync); 1341 assert_impl!(InspectOk<(), PhantomPinned>: Unpin); 1342 assert_not_impl!(InspectOk<PhantomPinned, ()>: Unpin); 1343 1344 assert_impl!(IntoAsyncRead<SendTryStream<Vec<u8>, io::Error>>: Send); 1345 assert_not_impl!(IntoAsyncRead<LocalTryStream<Vec<u8>, io::Error>>: Send); 1346 assert_impl!(IntoAsyncRead<SyncTryStream<Vec<u8>, io::Error>>: Sync); 1347 assert_not_impl!(IntoAsyncRead<LocalTryStream<Vec<u8>, io::Error>>: Sync); 1348 assert_impl!(IntoAsyncRead<UnpinTryStream<Vec<u8>, io::Error>>: Unpin); 1349 // IntoAsyncRead requires `St: Unpin` 1350 // assert_not_impl!(IntoAsyncRead<PinnedTryStream<Vec<u8>, io::Error>>: Unpin); 1351 1352 assert_impl!(IntoStream<()>: Send); 1353 assert_not_impl!(IntoStream<*const ()>: Send); 1354 assert_impl!(IntoStream<()>: Sync); 1355 assert_not_impl!(IntoStream<*const ()>: Sync); 1356 assert_impl!(IntoStream<()>: Unpin); 1357 assert_not_impl!(IntoStream<PhantomPinned>: Unpin); 1358 1359 assert_impl!(Iter<()>: Send); 1360 assert_not_impl!(Iter<*const ()>: Send); 1361 assert_impl!(Iter<()>: Sync); 1362 assert_not_impl!(Iter<*const ()>: Sync); 1363 assert_impl!(Iter<PhantomPinned>: Unpin); 1364 1365 assert_impl!(Map<(), ()>: Send); 1366 assert_not_impl!(Map<*const (), ()>: Send); 1367 assert_not_impl!(Map<(), *const ()>: Send); 1368 assert_impl!(Map<(), ()>: Sync); 1369 assert_not_impl!(Map<*const (), ()>: Sync); 1370 assert_not_impl!(Map<(), *const ()>: Sync); 1371 assert_impl!(Map<(), PhantomPinned>: Unpin); 1372 assert_not_impl!(Map<PhantomPinned, ()>: Unpin); 1373 1374 assert_impl!(MapErr<(), ()>: Send); 1375 assert_not_impl!(MapErr<*const (), ()>: Send); 1376 assert_not_impl!(MapErr<(), *const ()>: Send); 1377 assert_impl!(MapErr<(), ()>: Sync); 1378 assert_not_impl!(MapErr<*const (), ()>: Sync); 1379 assert_not_impl!(MapErr<(), *const ()>: Sync); 1380 assert_impl!(MapErr<(), PhantomPinned>: Unpin); 1381 assert_not_impl!(MapErr<PhantomPinned, ()>: Unpin); 1382 1383 assert_impl!(MapOk<(), ()>: Send); 1384 assert_not_impl!(MapOk<*const (), ()>: Send); 1385 assert_not_impl!(MapOk<(), *const ()>: Send); 1386 assert_impl!(MapOk<(), ()>: Sync); 1387 assert_not_impl!(MapOk<*const (), ()>: Sync); 1388 assert_not_impl!(MapOk<(), *const ()>: Sync); 1389 assert_impl!(MapOk<(), PhantomPinned>: Unpin); 1390 assert_not_impl!(MapOk<PhantomPinned, ()>: Unpin); 1391 1392 assert_impl!(Next<'_, ()>: Send); 1393 assert_not_impl!(Next<'_, *const ()>: Send); 1394 assert_impl!(Next<'_, ()>: Sync); 1395 assert_not_impl!(Next<'_, *const ()>: Sync); 1396 assert_impl!(Next<'_, ()>: Unpin); 1397 assert_not_impl!(Next<'_, PhantomPinned>: Unpin); 1398 1399 assert_impl!(NextIf<'_, SendStream<()>, ()>: Send); 1400 assert_not_impl!(NextIf<'_, SendStream<()>, *const ()>: Send); 1401 assert_not_impl!(NextIf<'_, SendStream, ()>: Send); 1402 assert_not_impl!(NextIf<'_, LocalStream<()>, ()>: Send); 1403 assert_impl!(NextIf<'_, SyncStream<()>, ()>: Sync); 1404 assert_not_impl!(NextIf<'_, SyncStream<()>, *const ()>: Sync); 1405 assert_not_impl!(NextIf<'_, SyncStream, ()>: Sync); 1406 assert_not_impl!(NextIf<'_, LocalStream<()>, ()>: Send); 1407 assert_impl!(NextIf<'_, PinnedStream, PhantomPinned>: Unpin); 1408 1409 assert_impl!(NextIfEq<'_, SendStream<()>, ()>: Send); 1410 assert_not_impl!(NextIfEq<'_, SendStream<()>, *const ()>: Send); 1411 assert_not_impl!(NextIfEq<'_, SendStream, ()>: Send); 1412 assert_not_impl!(NextIfEq<'_, LocalStream<()>, ()>: Send); 1413 assert_impl!(NextIfEq<'_, SyncStream<()>, ()>: Sync); 1414 assert_not_impl!(NextIfEq<'_, SyncStream<()>, *const ()>: Sync); 1415 assert_not_impl!(NextIfEq<'_, SyncStream, ()>: Sync); 1416 assert_not_impl!(NextIfEq<'_, LocalStream<()>, ()>: Send); 1417 assert_impl!(NextIfEq<'_, PinnedStream, PhantomPinned>: Unpin); 1418 1419 assert_impl!(Once<()>: Send); 1420 assert_not_impl!(Once<*const ()>: Send); 1421 assert_impl!(Once<()>: Sync); 1422 assert_not_impl!(Once<*const ()>: Sync); 1423 assert_impl!(Once<()>: Unpin); 1424 assert_not_impl!(Once<PhantomPinned>: Unpin); 1425 1426 assert_impl!(OrElse<(), (), ()>: Send); 1427 assert_not_impl!(OrElse<*const (), (), ()>: Send); 1428 assert_not_impl!(OrElse<(), *const (), ()>: Send); 1429 assert_not_impl!(OrElse<(), (), *const ()>: Send); 1430 assert_impl!(OrElse<(), (), ()>: Sync); 1431 assert_not_impl!(OrElse<*const (), (), ()>: Sync); 1432 assert_not_impl!(OrElse<(), *const (), ()>: Sync); 1433 assert_not_impl!(OrElse<(), (), *const ()>: Sync); 1434 assert_impl!(OrElse<(), (), PhantomPinned>: Unpin); 1435 assert_not_impl!(OrElse<PhantomPinned, (), ()>: Unpin); 1436 assert_not_impl!(OrElse<(), PhantomPinned, ()>: Unpin); 1437 1438 assert_impl!(Peek<'_, SendStream<()>>: Send); 1439 assert_not_impl!(Peek<'_, SendStream>: Send); 1440 assert_not_impl!(Peek<'_, LocalStream<()>>: Send); 1441 assert_impl!(Peek<'_, SyncStream<()>>: Sync); 1442 assert_not_impl!(Peek<'_, SyncStream>: Sync); 1443 assert_not_impl!(Peek<'_, LocalStream<()>>: Sync); 1444 assert_impl!(Peek<'_, PinnedStream>: Unpin); 1445 1446 assert_impl!(PeekMut<'_, SendStream<()>>: Send); 1447 assert_not_impl!(PeekMut<'_, SendStream>: Send); 1448 assert_not_impl!(PeekMut<'_, LocalStream<()>>: Send); 1449 assert_impl!(PeekMut<'_, SyncStream<()>>: Sync); 1450 assert_not_impl!(PeekMut<'_, SyncStream>: Sync); 1451 assert_not_impl!(PeekMut<'_, LocalStream<()>>: Sync); 1452 assert_impl!(PeekMut<'_, PinnedStream>: Unpin); 1453 1454 assert_impl!(Peekable<SendStream<()>>: Send); 1455 assert_not_impl!(Peekable<SendStream>: Send); 1456 assert_not_impl!(Peekable<LocalStream>: Send); 1457 assert_impl!(Peekable<SyncStream<()>>: Sync); 1458 assert_not_impl!(Peekable<SyncStream>: Sync); 1459 assert_not_impl!(Peekable<LocalStream>: Sync); 1460 assert_impl!(Peekable<UnpinStream>: Unpin); 1461 assert_not_impl!(Peekable<PinnedStream>: Unpin); 1462 1463 assert_impl!(Pending<()>: Send); 1464 assert_not_impl!(Pending<*const ()>: Send); 1465 assert_impl!(Pending<()>: Sync); 1466 assert_not_impl!(Pending<*const ()>: Sync); 1467 assert_impl!(Pending<PhantomPinned>: Unpin); 1468 1469 assert_impl!(PollFn<()>: Send); 1470 assert_not_impl!(PollFn<*const ()>: Send); 1471 assert_impl!(PollFn<()>: Sync); 1472 assert_not_impl!(PollFn<*const ()>: Sync); 1473 assert_impl!(PollFn<PhantomPinned>: Unpin); 1474 1475 assert_impl!(PollImmediate<SendStream>: Send); 1476 assert_not_impl!(PollImmediate<LocalStream<()>>: Send); 1477 assert_impl!(PollImmediate<SyncStream>: Sync); 1478 assert_not_impl!(PollImmediate<LocalStream<()>>: Sync); 1479 assert_impl!(PollImmediate<UnpinStream>: Unpin); 1480 assert_not_impl!(PollImmediate<PinnedStream>: Unpin); 1481 1482 assert_impl!(ReadyChunks<SendStream<()>>: Send); 1483 assert_not_impl!(ReadyChunks<SendStream>: Send); 1484 assert_not_impl!(ReadyChunks<LocalStream>: Send); 1485 assert_impl!(ReadyChunks<SyncStream<()>>: Sync); 1486 assert_not_impl!(ReadyChunks<SyncStream>: Sync); 1487 assert_not_impl!(ReadyChunks<LocalStream>: Sync); 1488 assert_impl!(ReadyChunks<UnpinStream>: Unpin); 1489 assert_not_impl!(ReadyChunks<PinnedStream>: Unpin); 1490 1491 assert_impl!(Repeat<()>: Send); 1492 assert_not_impl!(Repeat<*const ()>: Send); 1493 assert_impl!(Repeat<()>: Sync); 1494 assert_not_impl!(Repeat<*const ()>: Sync); 1495 assert_impl!(Repeat<PhantomPinned>: Unpin); 1496 1497 assert_impl!(RepeatWith<()>: Send); 1498 assert_not_impl!(RepeatWith<*const ()>: Send); 1499 assert_impl!(RepeatWith<()>: Sync); 1500 assert_not_impl!(RepeatWith<*const ()>: Sync); 1501 // RepeatWith requires `F: FnMut() -> A` 1502 assert_impl!(RepeatWith<fn() -> ()>: Unpin); 1503 // assert_impl!(RepeatWith<PhantomPinned>: Unpin); 1504 1505 assert_impl!(ReuniteError<(), ()>: Send); 1506 assert_not_impl!(ReuniteError<*const (), ()>: Send); 1507 assert_not_impl!(ReuniteError<(), *const ()>: Send); 1508 assert_impl!(ReuniteError<(), ()>: Sync); 1509 assert_not_impl!(ReuniteError<*const (), ()>: Sync); 1510 assert_not_impl!(ReuniteError<(), *const ()>: Sync); 1511 assert_impl!(ReuniteError<PhantomPinned, PhantomPinned>: Unpin); 1512 1513 assert_impl!(Scan<SendStream, (), (), ()>: Send); 1514 assert_not_impl!(Scan<LocalStream<()>, (), (), ()>: Send); 1515 assert_not_impl!(Scan<SendStream<()>, *const (), (), ()>: Send); 1516 assert_not_impl!(Scan<SendStream<()>, (), *const (), ()>: Send); 1517 assert_not_impl!(Scan<SendStream<()>, (), (), *const ()>: Send); 1518 assert_impl!(Scan<SyncStream, (), (), ()>: Sync); 1519 assert_not_impl!(Scan<LocalStream<()>, (), (), ()>: Sync); 1520 assert_not_impl!(Scan<SyncStream<()>, *const (), (), ()>: Sync); 1521 assert_not_impl!(Scan<SyncStream<()>, (), *const (), ()>: Sync); 1522 assert_not_impl!(Scan<SyncStream<()>, (), (), *const ()>: Sync); 1523 assert_impl!(Scan<UnpinStream, PhantomPinned, (), PhantomPinned>: Unpin); 1524 assert_not_impl!(Scan<PinnedStream, (), (), ()>: Unpin); 1525 assert_not_impl!(Scan<UnpinStream, (), PhantomPinned, ()>: Unpin); 1526 1527 assert_impl!(Select<(), ()>: Send); 1528 assert_not_impl!(Select<*const (), ()>: Send); 1529 assert_not_impl!(Select<(), *const ()>: Send); 1530 assert_impl!(Select<(), ()>: Sync); 1531 assert_not_impl!(Select<*const (), ()>: Sync); 1532 assert_not_impl!(Select<(), *const ()>: Sync); 1533 assert_impl!(Select<(), ()>: Unpin); 1534 assert_not_impl!(Select<PhantomPinned, ()>: Unpin); 1535 assert_not_impl!(Select<(), PhantomPinned>: Unpin); 1536 1537 assert_impl!(SelectAll<()>: Send); 1538 assert_not_impl!(SelectAll<*const ()>: Send); 1539 assert_impl!(SelectAll<()>: Sync); 1540 assert_not_impl!(SelectAll<*const ()>: Sync); 1541 assert_impl!(SelectAll<PhantomPinned>: Unpin); 1542 1543 assert_impl!(SelectNextSome<'_, ()>: Send); 1544 assert_not_impl!(SelectNextSome<'_, *const ()>: Send); 1545 assert_impl!(SelectNextSome<'_, ()>: Sync); 1546 assert_not_impl!(SelectNextSome<'_, *const ()>: Sync); 1547 assert_impl!(SelectNextSome<'_, PhantomPinned>: Unpin); 1548 1549 assert_impl!(Skip<()>: Send); 1550 assert_not_impl!(Skip<*const ()>: Send); 1551 assert_impl!(Skip<()>: Sync); 1552 assert_not_impl!(Skip<*const ()>: Sync); 1553 assert_impl!(Skip<()>: Unpin); 1554 assert_not_impl!(Skip<PhantomPinned>: Unpin); 1555 1556 assert_impl!(SkipWhile<SendStream<()>, (), ()>: Send); 1557 assert_not_impl!(SkipWhile<LocalStream<()>, (), ()>: Send); 1558 assert_not_impl!(SkipWhile<SendStream, (), ()>: Send); 1559 assert_not_impl!(SkipWhile<SendStream<()>, *const (), ()>: Send); 1560 assert_not_impl!(SkipWhile<SendStream<()>, (), *const ()>: Send); 1561 assert_impl!(SkipWhile<SyncStream<()>, (), ()>: Sync); 1562 assert_not_impl!(SkipWhile<LocalStream<()>, (), ()>: Sync); 1563 assert_not_impl!(SkipWhile<SyncStream, (), ()>: Sync); 1564 assert_not_impl!(SkipWhile<SyncStream<()>, *const (), ()>: Sync); 1565 assert_not_impl!(SkipWhile<SyncStream<()>, (), *const ()>: Sync); 1566 assert_impl!(SkipWhile<UnpinStream, (), PhantomPinned>: Unpin); 1567 assert_not_impl!(SkipWhile<PinnedStream, (), ()>: Unpin); 1568 assert_not_impl!(SkipWhile<UnpinStream, PhantomPinned, ()>: Unpin); 1569 1570 assert_impl!(SplitSink<(), ()>: Send); 1571 assert_not_impl!(SplitSink<*const (), ()>: Send); 1572 assert_not_impl!(SplitSink<(), *const ()>: Send); 1573 assert_impl!(SplitSink<(), ()>: Sync); 1574 assert_not_impl!(SplitSink<*const (), ()>: Sync); 1575 assert_not_impl!(SplitSink<(), *const ()>: Sync); 1576 assert_impl!(SplitSink<PhantomPinned, PhantomPinned>: Unpin); 1577 1578 assert_impl!(SplitStream<()>: Send); 1579 assert_not_impl!(SplitStream<*const ()>: Send); 1580 assert_impl!(SplitStream<()>: Sync); 1581 assert_not_impl!(SplitStream<*const ()>: Sync); 1582 assert_impl!(SplitStream<PhantomPinned>: Unpin); 1583 1584 assert_impl!(StreamFuture<()>: Send); 1585 assert_not_impl!(StreamFuture<*const ()>: Send); 1586 assert_impl!(StreamFuture<()>: Sync); 1587 assert_not_impl!(StreamFuture<*const ()>: Sync); 1588 assert_impl!(StreamFuture<()>: Unpin); 1589 assert_not_impl!(StreamFuture<PhantomPinned>: Unpin); 1590 1591 assert_impl!(Take<()>: Send); 1592 assert_not_impl!(Take<*const ()>: Send); 1593 assert_impl!(Take<()>: Sync); 1594 assert_not_impl!(Take<*const ()>: Sync); 1595 assert_impl!(Take<()>: Unpin); 1596 assert_not_impl!(Take<PhantomPinned>: Unpin); 1597 1598 assert_impl!(TakeUntil<SendStream, SendFuture<()>>: Send); 1599 assert_not_impl!(TakeUntil<SendStream, SendFuture>: Send); 1600 assert_not_impl!(TakeUntil<SendStream, LocalFuture<()>>: Send); 1601 assert_not_impl!(TakeUntil<LocalStream, SendFuture<()>>: Send); 1602 assert_impl!(TakeUntil<SyncStream, SyncFuture<()>>: Sync); 1603 assert_not_impl!(TakeUntil<SyncStream, SyncFuture>: Sync); 1604 assert_not_impl!(TakeUntil<SyncStream, LocalFuture<()>>: Sync); 1605 assert_not_impl!(TakeUntil<LocalStream, SyncFuture<()>>: Sync); 1606 assert_impl!(TakeUntil<UnpinStream, UnpinFuture>: Unpin); 1607 assert_not_impl!(TakeUntil<PinnedStream, UnpinFuture>: Unpin); 1608 assert_not_impl!(TakeUntil<UnpinStream, PinnedFuture>: Unpin); 1609 1610 assert_impl!(TakeWhile<SendStream<()>, (), ()>: Send); 1611 assert_not_impl!(TakeWhile<LocalStream<()>, (), ()>: Send); 1612 assert_not_impl!(TakeWhile<SendStream, (), ()>: Send); 1613 assert_not_impl!(TakeWhile<SendStream<()>, *const (), ()>: Send); 1614 assert_not_impl!(TakeWhile<SendStream<()>, (), *const ()>: Send); 1615 assert_impl!(TakeWhile<SyncStream<()>, (), ()>: Sync); 1616 assert_not_impl!(TakeWhile<LocalStream<()>, (), ()>: Sync); 1617 assert_not_impl!(TakeWhile<SyncStream, (), ()>: Sync); 1618 assert_not_impl!(TakeWhile<SyncStream<()>, *const (), ()>: Sync); 1619 assert_not_impl!(TakeWhile<SyncStream<()>, (), *const ()>: Sync); 1620 assert_impl!(TakeWhile<UnpinStream, (), PhantomPinned>: Unpin); 1621 assert_not_impl!(TakeWhile<PinnedStream, (), ()>: Unpin); 1622 assert_not_impl!(TakeWhile<UnpinStream, PhantomPinned, ()>: Unpin); 1623 1624 assert_impl!(Then<SendStream, (), ()>: Send); 1625 assert_not_impl!(Then<LocalStream<()>, (), ()>: Send); 1626 assert_not_impl!(Then<SendStream<()>, *const (), ()>: Send); 1627 assert_not_impl!(Then<SendStream<()>, (), *const ()>: Send); 1628 assert_impl!(Then<SyncStream, (), ()>: Sync); 1629 assert_not_impl!(Then<LocalStream<()>, (), ()>: Sync); 1630 assert_not_impl!(Then<SyncStream<()>, *const (), ()>: Sync); 1631 assert_not_impl!(Then<SyncStream<()>, (), *const ()>: Sync); 1632 assert_impl!(Then<UnpinStream, (), PhantomPinned>: Unpin); 1633 assert_not_impl!(Then<PinnedStream, (), ()>: Unpin); 1634 assert_not_impl!(Then<UnpinStream, PhantomPinned, ()>: Unpin); 1635 1636 assert_impl!(TryBufferUnordered<SendTryStream<()>>: Send); 1637 assert_not_impl!(TryBufferUnordered<SendTryStream>: Send); 1638 assert_not_impl!(TryBufferUnordered<LocalTryStream>: Send); 1639 assert_impl!(TryBufferUnordered<SyncTryStream<()>>: Sync); 1640 assert_not_impl!(TryBufferUnordered<SyncTryStream>: Sync); 1641 assert_not_impl!(TryBufferUnordered<LocalTryStream>: Sync); 1642 assert_impl!(TryBufferUnordered<UnpinTryStream>: Unpin); 1643 assert_not_impl!(TryBufferUnordered<PinnedTryStream>: Unpin); 1644 1645 assert_impl!(TryBuffered<SendTryStream<SendTryFuture<(), ()>>>: Send); 1646 assert_not_impl!(TryBuffered<SendTryStream<SendTryFuture<*const (), ()>>>: Send); 1647 assert_not_impl!(TryBuffered<SendTryStream<SendTryFuture<(), *const ()>>>: Send); 1648 assert_not_impl!(TryBuffered<SendTryStream<LocalTryFuture<(), ()>>>: Send); 1649 assert_not_impl!(TryBuffered<LocalTryStream<SendTryFuture<(), ()>>>: Send); 1650 assert_impl!(TryBuffered<SyncTryStream<SyncTryFuture<(), ()>>>: Sync); 1651 assert_not_impl!(TryBuffered<SyncTryStream<SyncTryFuture<*const (), ()>>>: Sync); 1652 assert_not_impl!(TryBuffered<SyncTryStream<SyncTryFuture<(), *const ()>>>: Sync); 1653 assert_not_impl!(TryBuffered<SyncTryStream<LocalTryFuture<(), ()>>>: Sync); 1654 assert_not_impl!(TryBuffered<LocalTryStream<SyncTryFuture<(), ()>>>: Sync); 1655 assert_impl!(TryBuffered<UnpinTryStream<PinnedTryFuture>>: Unpin); 1656 assert_not_impl!(TryBuffered<PinnedTryStream<UnpinTryFuture>>: Unpin); 1657 1658 assert_impl!(TryCollect<(), ()>: Send); 1659 assert_not_impl!(TryCollect<*const (), ()>: Send); 1660 assert_not_impl!(TryCollect<(), *const ()>: Send); 1661 assert_impl!(TryCollect<(), ()>: Sync); 1662 assert_not_impl!(TryCollect<*const (), ()>: Sync); 1663 assert_not_impl!(TryCollect<(), *const ()>: Sync); 1664 assert_impl!(TryCollect<(), PhantomPinned>: Unpin); 1665 assert_not_impl!(TryCollect<PhantomPinned, ()>: Unpin); 1666 1667 assert_impl!(TryConcat<SendTryStream<()>>: Send); 1668 assert_not_impl!(TryConcat<SendTryStream>: Send); 1669 assert_not_impl!(TryConcat<LocalTryStream>: Send); 1670 assert_impl!(TryConcat<SyncTryStream<()>>: Sync); 1671 assert_not_impl!(TryConcat<SyncTryStream>: Sync); 1672 assert_not_impl!(TryConcat<LocalTryStream>: Sync); 1673 assert_impl!(TryConcat<UnpinTryStream>: Unpin); 1674 assert_not_impl!(TryConcat<PinnedTryStream>: Unpin); 1675 1676 assert_impl!(TryFilter<SendTryStream<()>, (), ()>: Send); 1677 assert_not_impl!(TryFilter<LocalTryStream<()>, (), ()>: Send); 1678 assert_not_impl!(TryFilter<SendTryStream, (), ()>: Send); 1679 assert_not_impl!(TryFilter<SendTryStream<()>, *const (), ()>: Send); 1680 assert_not_impl!(TryFilter<SendTryStream<()>, (), *const ()>: Send); 1681 assert_impl!(TryFilter<SyncTryStream<()>, (), ()>: Sync); 1682 assert_not_impl!(TryFilter<LocalTryStream<()>, (), ()>: Sync); 1683 assert_not_impl!(TryFilter<SyncTryStream, (), ()>: Sync); 1684 assert_not_impl!(TryFilter<SyncTryStream<()>, *const (), ()>: Sync); 1685 assert_not_impl!(TryFilter<SyncTryStream<()>, (), *const ()>: Sync); 1686 assert_impl!(TryFilter<UnpinTryStream, (), PhantomPinned>: Unpin); 1687 assert_not_impl!(TryFilter<PinnedTryStream, (), ()>: Unpin); 1688 assert_not_impl!(TryFilter<UnpinTryStream, PhantomPinned, ()>: Unpin); 1689 1690 assert_impl!(TryFilterMap<(), (), ()>: Send); 1691 assert_not_impl!(TryFilterMap<*const (), (), ()>: Send); 1692 assert_not_impl!(TryFilterMap<(), *const (), ()>: Send); 1693 assert_not_impl!(TryFilterMap<(), (), *const ()>: Send); 1694 assert_impl!(TryFilterMap<(), (), ()>: Sync); 1695 assert_not_impl!(TryFilterMap<*const (), (), ()>: Sync); 1696 assert_not_impl!(TryFilterMap<(), *const (), ()>: Sync); 1697 assert_not_impl!(TryFilterMap<(), (), *const ()>: Sync); 1698 assert_impl!(TryFilterMap<(), (), PhantomPinned>: Unpin); 1699 assert_not_impl!(TryFilterMap<PhantomPinned, (), ()>: Unpin); 1700 assert_not_impl!(TryFilterMap<(), PhantomPinned, ()>: Unpin); 1701 1702 assert_impl!(TryFlatten<SendTryStream<()>>: Send); 1703 assert_not_impl!(TryFlatten<SendTryStream>: Send); 1704 assert_not_impl!(TryFlatten<SendTryStream>: Send); 1705 assert_impl!(TryFlatten<SyncTryStream<()>>: Sync); 1706 assert_not_impl!(TryFlatten<LocalTryStream<()>>: Sync); 1707 assert_not_impl!(TryFlatten<LocalTryStream<()>>: Sync); 1708 assert_impl!(TryFlatten<UnpinTryStream<()>>: Unpin); 1709 assert_not_impl!(TryFlatten<UnpinTryStream>: Unpin); 1710 assert_not_impl!(TryFlatten<PinnedTryStream>: Unpin); 1711 1712 assert_impl!(TryFold<(), (), (), ()>: Send); 1713 assert_not_impl!(TryFold<*const (), (), (), ()>: Send); 1714 assert_not_impl!(TryFold<(), *const (), (), ()>: Send); 1715 assert_not_impl!(TryFold<(), (), *const (), ()>: Send); 1716 assert_not_impl!(TryFold<(), (), (), *const ()>: Send); 1717 assert_impl!(TryFold<(), (), (), ()>: Sync); 1718 assert_not_impl!(TryFold<*const (), (), (), ()>: Sync); 1719 assert_not_impl!(TryFold<(), *const (), (), ()>: Sync); 1720 assert_not_impl!(TryFold<(), (), *const (), ()>: Sync); 1721 assert_not_impl!(TryFold<(), (), (), *const ()>: Sync); 1722 assert_impl!(TryFold<(), (), PhantomPinned, PhantomPinned>: Unpin); 1723 assert_not_impl!(TryFold<PhantomPinned, (), (), ()>: Unpin); 1724 assert_not_impl!(TryFold<(), PhantomPinned, (), ()>: Unpin); 1725 1726 assert_impl!(TryForEach<(), (), ()>: Send); 1727 assert_not_impl!(TryForEach<*const (), (), ()>: Send); 1728 assert_not_impl!(TryForEach<(), *const (), ()>: Send); 1729 assert_not_impl!(TryForEach<(), (), *const ()>: Send); 1730 assert_impl!(TryForEach<(), (), ()>: Sync); 1731 assert_not_impl!(TryForEach<*const (), (), ()>: Sync); 1732 assert_not_impl!(TryForEach<(), *const (), ()>: Sync); 1733 assert_not_impl!(TryForEach<(), (), *const ()>: Sync); 1734 assert_impl!(TryForEach<(), (), PhantomPinned>: Unpin); 1735 assert_not_impl!(TryForEach<PhantomPinned, (), ()>: Unpin); 1736 assert_not_impl!(TryForEach<(), PhantomPinned, ()>: Unpin); 1737 1738 assert_impl!(TryForEachConcurrent<(), (), ()>: Send); 1739 assert_not_impl!(TryForEachConcurrent<*const (), (), ()>: Send); 1740 assert_not_impl!(TryForEachConcurrent<(), *const (), ()>: Send); 1741 assert_not_impl!(TryForEachConcurrent<(), (), *const ()>: Send); 1742 assert_impl!(TryForEachConcurrent<(), (), ()>: Sync); 1743 assert_not_impl!(TryForEachConcurrent<*const (), (), ()>: Sync); 1744 assert_not_impl!(TryForEachConcurrent<(), *const (), ()>: Sync); 1745 assert_not_impl!(TryForEachConcurrent<(), (), *const ()>: Sync); 1746 assert_impl!(TryForEachConcurrent<(), PhantomPinned, PhantomPinned>: Unpin); 1747 assert_not_impl!(TryForEachConcurrent<PhantomPinned, (), ()>: Unpin); 1748 1749 assert_impl!(TryNext<'_, ()>: Send); 1750 assert_not_impl!(TryNext<'_, *const ()>: Send); 1751 assert_impl!(TryNext<'_, ()>: Sync); 1752 assert_not_impl!(TryNext<'_, *const ()>: Sync); 1753 assert_impl!(TryNext<'_, ()>: Unpin); 1754 assert_not_impl!(TryNext<'_, PhantomPinned>: Unpin); 1755 1756 assert_impl!(TrySkipWhile<SendTryStream<()>, (), ()>: Send); 1757 assert_not_impl!(TrySkipWhile<LocalTryStream<()>, (), ()>: Send); 1758 assert_not_impl!(TrySkipWhile<SendTryStream, (), ()>: Send); 1759 assert_not_impl!(TrySkipWhile<SendTryStream<()>, *const (), ()>: Send); 1760 assert_not_impl!(TrySkipWhile<SendTryStream<()>, (), *const ()>: Send); 1761 assert_impl!(TrySkipWhile<SyncTryStream<()>, (), ()>: Sync); 1762 assert_not_impl!(TrySkipWhile<LocalTryStream<()>, (), ()>: Sync); 1763 assert_not_impl!(TrySkipWhile<SyncTryStream, (), ()>: Sync); 1764 assert_not_impl!(TrySkipWhile<SyncTryStream<()>, *const (), ()>: Sync); 1765 assert_not_impl!(TrySkipWhile<SyncTryStream<()>, (), *const ()>: Sync); 1766 assert_impl!(TrySkipWhile<UnpinTryStream, (), PhantomPinned>: Unpin); 1767 assert_not_impl!(TrySkipWhile<PinnedTryStream, (), ()>: Unpin); 1768 assert_not_impl!(TrySkipWhile<UnpinTryStream, PhantomPinned, ()>: Unpin); 1769 1770 assert_impl!(TryTakeWhile<SendTryStream<()>, (), ()>: Send); 1771 assert_not_impl!(TryTakeWhile<LocalTryStream<()>, (), ()>: Send); 1772 assert_not_impl!(TryTakeWhile<SendTryStream, (), ()>: Send); 1773 assert_not_impl!(TryTakeWhile<SendTryStream<()>, *const (), ()>: Send); 1774 assert_not_impl!(TryTakeWhile<SendTryStream<()>, (), *const ()>: Send); 1775 assert_impl!(TryTakeWhile<SyncTryStream<()>, (), ()>: Sync); 1776 assert_not_impl!(TryTakeWhile<LocalTryStream<()>, (), ()>: Sync); 1777 assert_not_impl!(TryTakeWhile<SyncTryStream, (), ()>: Sync); 1778 assert_not_impl!(TryTakeWhile<SyncTryStream<()>, *const (), ()>: Sync); 1779 assert_not_impl!(TryTakeWhile<SyncTryStream<()>, (), *const ()>: Sync); 1780 assert_impl!(TryTakeWhile<UnpinTryStream, (), PhantomPinned>: Unpin); 1781 assert_not_impl!(TryTakeWhile<PinnedTryStream, (), ()>: Unpin); 1782 assert_not_impl!(TryTakeWhile<UnpinTryStream, PhantomPinned, ()>: Unpin); 1783 1784 assert_impl!(TryUnfold<(), (), ()>: Send); 1785 assert_not_impl!(TryUnfold<*const (), (), ()>: Send); 1786 assert_not_impl!(TryUnfold<(), *const (), ()>: Send); 1787 assert_not_impl!(TryUnfold<(), (), *const ()>: Send); 1788 assert_impl!(TryUnfold<(), (), ()>: Sync); 1789 assert_not_impl!(TryUnfold<*const (), (), ()>: Sync); 1790 assert_not_impl!(TryUnfold<(), *const (), ()>: Sync); 1791 assert_not_impl!(TryUnfold<(), (), *const ()>: Sync); 1792 assert_impl!(TryUnfold<PhantomPinned, PhantomPinned, ()>: Unpin); 1793 assert_not_impl!(TryUnfold<(), (), PhantomPinned>: Unpin); 1794 1795 assert_impl!(Unfold<(), (), ()>: Send); 1796 assert_not_impl!(Unfold<*const (), (), ()>: Send); 1797 assert_not_impl!(Unfold<(), *const (), ()>: Send); 1798 assert_not_impl!(Unfold<(), (), *const ()>: Send); 1799 assert_impl!(Unfold<(), (), ()>: Sync); 1800 assert_not_impl!(Unfold<*const (), (), ()>: Sync); 1801 assert_not_impl!(Unfold<(), *const (), ()>: Sync); 1802 assert_not_impl!(Unfold<(), (), *const ()>: Sync); 1803 assert_impl!(Unfold<PhantomPinned, PhantomPinned, ()>: Unpin); 1804 assert_not_impl!(Unfold<(), (), PhantomPinned>: Unpin); 1805 1806 assert_impl!(Unzip<(), (), ()>: Send); 1807 assert_not_impl!(Unzip<*const (), (), ()>: Send); 1808 assert_not_impl!(Unzip<(), *const (), ()>: Send); 1809 assert_not_impl!(Unzip<(), (), *const ()>: Send); 1810 assert_impl!(Unzip<(), (), ()>: Sync); 1811 assert_not_impl!(Unzip<*const (), (), ()>: Sync); 1812 assert_not_impl!(Unzip<(), *const (), ()>: Sync); 1813 assert_not_impl!(Unzip<(), (), *const ()>: Sync); 1814 assert_impl!(Unzip<(), PhantomPinned, PhantomPinned>: Unpin); 1815 assert_not_impl!(Unzip<PhantomPinned, (), ()>: Unpin); 1816 1817 assert_impl!(Zip<SendStream<()>, SendStream<()>>: Send); 1818 assert_not_impl!(Zip<SendStream, SendStream<()>>: Send); 1819 assert_not_impl!(Zip<SendStream<()>, SendStream>: Send); 1820 assert_not_impl!(Zip<LocalStream, SendStream<()>>: Send); 1821 assert_not_impl!(Zip<SendStream<()>, LocalStream>: Send); 1822 assert_impl!(Zip<SyncStream<()>, SyncStream<()>>: Sync); 1823 assert_not_impl!(Zip<SyncStream, SyncStream<()>>: Sync); 1824 assert_not_impl!(Zip<SyncStream<()>, SyncStream>: Sync); 1825 assert_not_impl!(Zip<LocalStream, SyncStream<()>>: Sync); 1826 assert_not_impl!(Zip<SyncStream<()>, LocalStream>: Sync); 1827 assert_impl!(Zip<UnpinStream, UnpinStream>: Unpin); 1828 assert_not_impl!(Zip<UnpinStream, PinnedStream>: Unpin); 1829 assert_not_impl!(Zip<PinnedStream, UnpinStream>: Unpin); 1830 1831 assert_impl!(futures_unordered::Iter<()>: Send); 1832 assert_not_impl!(futures_unordered::Iter<*const ()>: Send); 1833 assert_impl!(futures_unordered::Iter<()>: Sync); 1834 assert_not_impl!(futures_unordered::Iter<*const ()>: Sync); 1835 assert_impl!(futures_unordered::Iter<()>: Unpin); 1836 // The definition of futures_unordered::Iter has `Fut: Unpin` bounds. 1837 // assert_not_impl!(futures_unordered::Iter<PhantomPinned>: Unpin); 1838 1839 assert_impl!(futures_unordered::IterMut<()>: Send); 1840 assert_not_impl!(futures_unordered::IterMut<*const ()>: Send); 1841 assert_impl!(futures_unordered::IterMut<()>: Sync); 1842 assert_not_impl!(futures_unordered::IterMut<*const ()>: Sync); 1843 assert_impl!(futures_unordered::IterMut<()>: Unpin); 1844 // The definition of futures_unordered::IterMut has `Fut: Unpin` bounds. 1845 // assert_not_impl!(futures_unordered::IterMut<PhantomPinned>: Unpin); 1846 1847 assert_impl!(futures_unordered::IterPinMut<()>: Send); 1848 assert_not_impl!(futures_unordered::IterPinMut<*const ()>: Send); 1849 assert_impl!(futures_unordered::IterPinMut<()>: Sync); 1850 assert_not_impl!(futures_unordered::IterPinMut<*const ()>: Sync); 1851 assert_impl!(futures_unordered::IterPinMut<PhantomPinned>: Unpin); 1852 1853 assert_impl!(futures_unordered::IterPinRef<()>: Send); 1854 assert_not_impl!(futures_unordered::IterPinRef<*const ()>: Send); 1855 assert_impl!(futures_unordered::IterPinRef<()>: Sync); 1856 assert_not_impl!(futures_unordered::IterPinRef<*const ()>: Sync); 1857 assert_impl!(futures_unordered::IterPinRef<PhantomPinned>: Unpin); 1858 1859 assert_impl!(futures_unordered::IntoIter<()>: Send); 1860 assert_not_impl!(futures_unordered::IntoIter<*const ()>: Send); 1861 assert_impl!(futures_unordered::IntoIter<()>: Sync); 1862 assert_not_impl!(futures_unordered::IntoIter<*const ()>: Sync); 1863 // The definition of futures_unordered::IntoIter has `Fut: Unpin` bounds. 1864 // assert_not_impl!(futures_unordered::IntoIter<PhantomPinned>: Unpin); 1865 } 1866 1867 /// Assert Send/Sync/Unpin for all public types in `futures::task`. 1868 pub mod task { 1869 use super::*; 1870 use futures::task::*; 1871 1872 assert_impl!(AtomicWaker: Send); 1873 assert_impl!(AtomicWaker: Sync); 1874 assert_impl!(AtomicWaker: Unpin); 1875 1876 assert_impl!(FutureObj<*const ()>: Send); 1877 assert_not_impl!(FutureObj<()>: Sync); 1878 assert_impl!(FutureObj<PhantomPinned>: Unpin); 1879 1880 assert_not_impl!(LocalFutureObj<()>: Send); 1881 assert_not_impl!(LocalFutureObj<()>: Sync); 1882 assert_impl!(LocalFutureObj<PhantomPinned>: Unpin); 1883 1884 assert_impl!(SpawnError: Send); 1885 assert_impl!(SpawnError: Sync); 1886 assert_impl!(SpawnError: Unpin); 1887 1888 assert_impl!(WakerRef<'_>: Send); 1889 assert_impl!(WakerRef<'_>: Sync); 1890 assert_impl!(WakerRef<'_>: Unpin); 1891 } 1892