Clarify that send_to might return an error in certain cases

Closes #34202
This commit is contained in:
Abhishek Chanda 2016-10-27 15:23:19 +01:00
parent 46d39f3329
commit 50bfc23816

View File

@ -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<A: ToSocketAddrs>(&self, buf: &[u8], addr: A)
-> io::Result<usize> {