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