Skip to content

Commit 019b5b5

Browse files
authored
Rollup merge of rust-lang#64728 - messense:udp-peer-addr, r=dtolnay
Stabilize UdpSocket::peer_addr Fixes rust-lang#59127
2 parents 0085263 + 1de6f74 commit 019b5b5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/libstd/net/udp.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ impl UdpSocket {
185185
/// # Examples
186186
///
187187
/// ```no_run
188-
/// #![feature(udp_peer_addr)]
189188
/// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket};
190189
///
191190
/// let socket = UdpSocket::bind("127.0.0.1:34254").expect("couldn't bind to address");
@@ -199,14 +198,13 @@ impl UdpSocket {
199198
/// [`NotConnected`]: ../../std/io/enum.ErrorKind.html#variant.NotConnected
200199
///
201200
/// ```no_run
202-
/// #![feature(udp_peer_addr)]
203201
/// use std::net::UdpSocket;
204202
///
205203
/// let socket = UdpSocket::bind("127.0.0.1:34254").expect("couldn't bind to address");
206204
/// assert_eq!(socket.peer_addr().unwrap_err().kind(),
207205
/// ::std::io::ErrorKind::NotConnected);
208206
/// ```
209-
#[unstable(feature = "udp_peer_addr", issue = "59127")]
207+
#[stable(feature = "udp_peer_addr", since = "1.40.0")]
210208
pub fn peer_addr(&self) -> io::Result<SocketAddr> {
211209
self.0.peer_addr()
212210
}

0 commit comments

Comments
 (0)