]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // run-pass |
2 | ||
abe05a73 | 3 | // ignore-wasm32-bare networking not available |
48663c56 | 4 | // ignore-sgx ToSocketAddrs cannot be used for DNS Resolution |
2b03887a | 5 | // ignore-fuchsia Req. test-harness networking privileges |
abe05a73 | 6 | |
83c7162d | 7 | use std::net::ToSocketAddrs; |
223e47cc | 8 | |
e9174d1e SL |
9 | fn is_sync<T>(_: T) where T: Sync {} |
10 | fn is_send<T>(_: T) where T: Send {} | |
62682a34 | 11 | |
e9174d1e SL |
12 | macro_rules! all_sync_send { |
13 | ($ctor:expr, $($iter:ident),+) => ({ | |
14 | $( | |
15 | let mut x = $ctor; | |
16 | is_sync(x.$iter()); | |
17 | let mut y = $ctor; | |
18 | is_send(y.$iter()); | |
19 | )+ | |
20 | }) | |
62682a34 SL |
21 | } |
22 | ||
23 | fn main() { | |
83c7162d | 24 | all_sync_send!("localhost:80".to_socket_addrs().unwrap(), next); |
62682a34 | 25 | } |