Skip to content

Commit 50bfc23

Browse files
committed
Clarify that send_to might return an error in certain cases
Closes #34202
1 parent 46d39f3 commit 50bfc23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libstd/net/udp.rs

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ impl UdpSocket {
6767
///
6868
/// Address type can be any implementor of `ToSocketAddrs` trait. See its
6969
/// documentation for concrete examples.
70+
/// This will return an error when the IP version of the local socket
71+
/// does not match that returned from `ToSocketAddrs`
72+
/// See https://github.com/rust-lang/rust/issues/34202 for more details.
7073
#[stable(feature = "rust1", since = "1.0.0")]
7174
pub fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A)
7275
-> io::Result<usize> {

0 commit comments

Comments
 (0)