mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 03:57:37 +00:00

Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
16 lines
336 B
Rust
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>();
|
|
}
|