about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam Harvey <adam@adamharvey.name>2025-09-24 15:56:38 -0700
committerAdam Harvey <adam@adamharvey.name>2025-09-24 15:56:38 -0700
commit852da23a2d06de5a7821b1fdb356fe3a410b2d00 (patch)
tree8808aa8a95cefa142af641655d1642fd1c6ca4d5
parentcaccb4d0368bd918ef6668af8e13834d07040417 (diff)
downloadrust-852da23a2d06de5a7821b1fdb356fe3a410b2d00.tar.gz
rust-852da23a2d06de5a7821b1fdb356fe3a410b2d00.zip
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`.
Although the examples below this list do imply that there's an impl of
`ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list
of default implementations.
-rw-r--r--library/std/src/net/socket_addr.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/net/socket_addr.rs b/library/std/src/net/socket_addr.rs
index 5b56dd3f744..8214ad381f1 100644
--- a/library/std/src/net/socket_addr.rs
+++ b/library/std/src/net/socket_addr.rs
@@ -28,6 +28,8 @@ use crate::{io, iter, option, slice, vec};
 ///    [`SocketAddr`] as expected by its [`FromStr`] implementation or a string like
 ///    `<host_name>:<port>` pair where `<port>` is a [`u16`] value.
 ///
+///  * <code>&[[SocketAddr]]</code>: all [`SocketAddr`] values in the slice will be used.
+///
 /// This trait allows constructing network objects like [`TcpStream`] or
 /// [`UdpSocket`] easily with values of various types for the bind/connection
 /// address. It is needed because sometimes one type is more appropriate than