diff options
| author | kennytm <kennytm@gmail.com> | 2019-02-20 01:13:36 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2019-02-20 11:59:07 +0800 |
| commit | ef0aaddf691030874e147ca5ee79332fec0c9566 (patch) | |
| tree | aab049292b7711e377f7fa190c15726dbc8a9e8d /src/libstd | |
| parent | 836863851574dc8de4d0488a16b949afc4e397a7 (diff) | |
| parent | 01bebdf19321a1597f35c2fc2130f1627e944bcf (diff) | |
| download | rust-ef0aaddf691030874e147ca5ee79332fec0c9566.tar.gz rust-ef0aaddf691030874e147ca5ee79332fec0c9566.zip | |
Rollup merge of #58551 - ssomers:master, r=oli-obk
Explain a panic in test case net::tcp::tests::double_bind Those who try to build libstd on the Windows Subsystem for Linux experience a single failing test, where the point of failure is an explicit but anonymous panic, as reported in https://github.com/rust-lang/rust/issues/49367 This commit somewhat explains why and allows diagnosing a little.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/net/tcp.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index c4b0cd0f17c..3eb2a332d26 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -1187,9 +1187,13 @@ mod tests { #[test] fn double_bind() { each_ip(&mut |addr| { - let _listener = t!(TcpListener::bind(&addr)); + let listener1 = t!(TcpListener::bind(&addr)); match TcpListener::bind(&addr) { - Ok(..) => panic!(), + Ok(listener2) => panic!( + "This system (perhaps due to options set by TcpListener::bind) \ + permits double binding: {:?} and {:?}", + listener1, listener2 + ), Err(e) => { assert!(e.kind() == ErrorKind::ConnectionRefused || e.kind() == ErrorKind::Other || |
