From 50bfc238169844fff8287efc48ee4da3076b2f78 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Thu, 27 Oct 2016 15:23:19 +0100 Subject: [PATCH] Clarify that send_to might return an error in certain cases Closes #34202 --- src/libstd/net/udp.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index c03ac496adbb2..559250adac5ed 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -67,6 +67,9 @@ impl UdpSocket { /// /// Address type can be any implementor of `ToSocketAddrs` trait. See its /// documentation for concrete examples. + /// This will return an error when the IP version of the local socket + /// does not match that returned from `ToSocketAddrs` + /// See https://github.com/rust-lang/rust/issues/34202 for more details. #[stable(feature = "rust1", since = "1.0.0")] pub fn send_to(&self, buf: &[u8], addr: A) -> io::Result {