1#![warn(rust_2018_idioms)]
2#![cfg(all(feature = "full", not(target_os = "wasi")))] // Wasi doesn't support panic recovery or bind
3
4use tokio::net::TcpListener;
5
6use std::net;
7
8#[test]
9#[should_panic]
10fn no_runtime_panics_binding_net_tcp_listener() {
11 let listener = net::TcpListener::bind("127.0.0.1:0").expect("failed to bind listener");
12 let _ = TcpListener::try_from(listener);
13}
14