]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22577.rs
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-22577.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 use std::{fs, net};
6
7 fn assert_both<T: Send + Sync>() {}
8 fn assert_send<T: Send>() {}
9
10 fn main() {
11     assert_both::<fs::File>();
12     assert_both::<fs::Metadata>();
13     assert_both::<fs::ReadDir>();
14     assert_both::<fs::DirEntry>();
15     assert_both::<fs::OpenOptions>();
16     assert_both::<fs::Permissions>();
17
18     assert_both::<net::TcpStream>();
19     assert_both::<net::TcpListener>();
20     assert_both::<net::UdpSocket>();
21     assert_both::<net::SocketAddr>();
22     assert_both::<net::SocketAddrV4>();
23     assert_both::<net::SocketAddrV6>();
24     assert_both::<net::Ipv4Addr>();
25     assert_both::<net::Ipv6Addr>();
26 }