]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/net/tcp.rs
Merge remote-tracking branch 'upstream/master'
[rust.git] / src / libstd / net / tcp.rs
index c4b0cd0f17c347e6e4240637dd3b5976eaf733e0..3eb2a332d267b848aad1bad6a5f1d38981def6e9 100644 (file)
@@ -1187,9 +1187,13 @@ fn partial_read() {
     #[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 ||