Skip to content

Commit

Permalink
Add missing assertions to auto_traits test
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed May 7, 2021
1 parent 9c107db commit d2b64db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions futures/tests/auto_traits.rs
Expand Up @@ -1781,23 +1781,31 @@ pub mod stream {
assert_not_impl!(Zip<PinnedStream, UnpinStream>: Unpin);

assert_impl!(futures_unordered::Iter<()>: Send);
assert_not_impl!(futures_unordered::Iter<*const ()>: Send);
assert_impl!(futures_unordered::Iter<()>: Sync);
assert_not_impl!(futures_unordered::Iter<*const ()>: Sync);
assert_impl!(futures_unordered::Iter<()>: Unpin);
// futures_unordered::Iter requires `Fut: Unpin`
// The definition of futures_unordered::Iter has `Fut: Unpin` bounds.
// assert_not_impl!(futures_unordered::Iter<PhantomPinned>: Unpin);

assert_impl!(futures_unordered::IterMut<()>: Send);
assert_not_impl!(futures_unordered::IterMut<*const ()>: Send);
assert_impl!(futures_unordered::IterMut<()>: Sync);
assert_not_impl!(futures_unordered::IterMut<*const ()>: Sync);
assert_impl!(futures_unordered::IterMut<()>: Unpin);
// futures_unordered::IterMut requires `Fut: Unpin`
// The definition of futures_unordered::IterMut has `Fut: Unpin` bounds.
// assert_not_impl!(futures_unordered::IterMut<PhantomPinned>: Unpin);

assert_impl!(futures_unordered::IterPinMut<()>: Send);
assert_not_impl!(futures_unordered::IterPinMut<*const ()>: Send);
assert_impl!(futures_unordered::IterPinMut<()>: Sync);
assert_not_impl!(futures_unordered::IterPinMut<*const ()>: Sync);
assert_impl!(futures_unordered::IterPinMut<PhantomPinned>: Unpin);

assert_impl!(futures_unordered::IterPinRef<()>: Send);
assert_not_impl!(futures_unordered::IterPinRef<*const ()>: Send);
assert_impl!(futures_unordered::IterPinRef<()>: Sync);
assert_not_impl!(futures_unordered::IterPinRef<*const ()>: Sync);
assert_impl!(futures_unordered::IterPinRef<PhantomPinned>: Unpin);
}

Expand Down

0 comments on commit d2b64db

Please sign in to comment.