rustc/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs
2025-02-17 11:14:05 +01:00

16 lines
336 B
Rust

//@ run-pass
use std::sync;
fn assert_both<T: Sync + Send>() {}
fn main() {
assert_both::<sync::Mutex<()>>();
assert_both::<sync::Condvar>();
assert_both::<sync::RwLock<()>>();
assert_both::<sync::Barrier>();
assert_both::<sync::Arc<()>>();
assert_both::<sync::Weak<()>>();
assert_both::<sync::Once>();
}