Skip to content

Commit df2dce3

Browse files
committed
Mark UdpSocket peer_addr unstable w/ tracking issue
1 parent 02f26e3 commit df2dce3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/net/udp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,15 @@ impl UdpSocket {
185185
/// # Examples
186186
///
187187
/// ```no_run
188+
/// #![feature(udp_peer_addr)]
188189
/// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket};
189190
///
190191
/// let socket = UdpSocket::bind("127.0.0.1:34254").expect("couldn't bind to address");
191192
/// socket.connect("192.168.0.1:41203").expect("couldn't connect to address");
192193
/// assert_eq!(socket.peer_addr().unwrap(),
193194
/// SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(192, 168, 0, 1), 41203)));
194195
/// ```
195-
#[stable(feature = "rust1", since = "1.0.0")]
196+
#[unstable(feature = "udp_peer_addr", issue = "59127")]
196197
pub fn peer_addr(&self) -> io::Result<SocketAddr> {
197198
self.0.peer_addr()
198199
}

0 commit comments

Comments
 (0)