Rollup merge of #93585 - tamaroning:add_tests_for_92630, r=m-ou-se

Missing tests for #92630

fixes #93143
This commit is contained in:
Matthias Krüger 2022-02-04 14:59:03 +01:00 committed by GitHub
commit ca2ef71e96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View file

@ -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>>();
}

View file

@ -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>>();
}

View file

@ -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>>();
}