提交 d7128822 编写于 作者: E Eduard-Mihai Burtescu 提交者: GitHub

Rollup merge of #37432 - achanda:send_to, r=alexcrichton

Clarify that send_to might panic in certain cases

Closes #34202

r? @alexcrichton
......@@ -67,6 +67,9 @@ pub fn recv_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)> {
///
/// 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> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册