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