Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tests for #92630 #93585

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions library/core/tests/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>();
}
8 changes: 8 additions & 0 deletions library/core/tests/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>();
}
8 changes: 8 additions & 0 deletions library/core/tests/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>();
}