diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-04 14:59:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-04 14:59:03 +0100 |
| commit | ca2ef71e96b0a431f6085449c6d5583b13afa079 (patch) | |
| tree | 6bbbfe798a9e05daa0c357dbf4b83a90b5dcadb5 | |
| parent | f070e0b5a654b51d88e3e1bea1bf5f2bb52b38e5 (diff) | |
| parent | 83242897fb356f51762e0e466dfd53186725028a (diff) | |
| download | rust-ca2ef71e96b0a431f6085449c6d5583b13afa079.tar.gz rust-ca2ef71e96b0a431f6085449c6d5583b13afa079.zip | |
Rollup merge of #93585 - tamaroning:add_tests_for_92630, r=m-ou-se
Missing tests for #92630 fixes #93143
| -rw-r--r-- | library/core/tests/future.rs | 8 | ||||
| -rw-r--r-- | library/core/tests/hash/mod.rs | 8 | ||||
| -rw-r--r-- | library/core/tests/iter/traits/iterator.rs | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/library/core/tests/future.rs b/library/core/tests/future.rs index 0ed8c52c212..74b6f74e401 100644 --- a/library/core/tests/future.rs +++ b/library/core/tests/future.rs @@ -118,3 +118,11 @@ fn block_on(fut: impl Future) { } } } + +// just tests by whether or not this compiles +fn _pending_impl_all_auto_traits<T>() { + use std::panic::{RefUnwindSafe, UnwindSafe}; + fn all_auto_traits<T: Send + Sync + Unpin + UnwindSafe + RefUnwindSafe>() {} + + all_auto_traits::<std::future::Pending<T>>(); +} diff --git a/library/core/tests/hash/mod.rs b/library/core/tests/hash/mod.rs index 72ccdd4848a..a173e461c60 100644 --- a/library/core/tests/hash/mod.rs +++ b/library/core/tests/hash/mod.rs @@ -146,3 +146,11 @@ fn test_build_hasher_object_safe() { let _: &dyn BuildHasher<Hasher = DefaultHasher> = &RandomState::new(); } + +// just tests by whether or not this compiles +fn _build_hasher_default_impl_all_auto_traits<T>() { + use std::panic::{RefUnwindSafe, UnwindSafe}; + fn all_auto_traits<T: Send + Sync + Unpin + UnwindSafe + RefUnwindSafe>() {} + + all_auto_traits::<std::hash::BuildHasherDefault<T>>(); +} diff --git a/library/core/tests/iter/traits/iterator.rs b/library/core/tests/iter/traits/iterator.rs index bb4da831412..972d61ba909 100644 --- a/library/core/tests/iter/traits/iterator.rs +++ b/library/core/tests/iter/traits/iterator.rs @@ -496,3 +496,11 @@ fn test_collect() { let b: Vec<isize> = a.iter().cloned().collect(); assert!(a == b); } + +// just tests by whether or not this compiles +fn _empty_impl_all_auto_traits<T>() { + use std::panic::{RefUnwindSafe, UnwindSafe}; + fn all_auto_traits<T: Send + Sync + Unpin + UnwindSafe + RefUnwindSafe>() {} + + all_auto_traits::<std::iter::Empty<T>>(); +} |
