Skip to content

Commit d712882

Browse files
authored
Rollup merge of rust-lang#37432 - achanda:send_to, r=alexcrichton
Clarify that send_to might panic in certain cases Closes rust-lang#34202 r? @alexcrichton
2 parents bd9969f + 50bfc23 commit d712882

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libstd/net/udp.rs

Lines changed: 3 additions & 0 deletions
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)