Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize const_char_classify, const_sockaddr_setters #138129

Merged
merged 2 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
@@ -337,7 +337,7 @@ impl char {
/// '1'.is_digit(1);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_char_classify", issue = "132241")]
#[rustc_const_stable(feature = "const_char_classify", since = "CURRENT_RUSTC_VERSION")]
#[inline]
pub const fn is_digit(self, radix: u32) -> bool {
self.to_digit(radix).is_some()
@@ -886,7 +886,7 @@ impl char {
/// ```
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_char_classify", issue = "132241")]
#[rustc_const_stable(feature = "const_char_classify", since = "CURRENT_RUSTC_VERSION")]
#[inline]
pub const fn is_whitespace(self) -> bool {
match self {
16 changes: 8 additions & 8 deletions library/core/src/net/socket_addr.rs
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ impl SocketAddr {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_ip(&mut self, new_ip: IpAddr) {
// `match (*self, new_ip)` would have us mutate a copy of self only to throw it away.
match (self, new_ip) {
@@ -244,7 +244,7 @@ impl SocketAddr {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_port(&mut self, new_port: u16) {
match *self {
SocketAddr::V4(ref mut a) => a.set_port(new_port),
@@ -350,7 +350,7 @@ impl SocketAddrV4 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_ip(&mut self, new_ip: Ipv4Addr) {
self.ip = new_ip;
}
@@ -386,7 +386,7 @@ impl SocketAddrV4 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_port(&mut self, new_port: u16) {
self.port = new_port;
}
@@ -448,7 +448,7 @@ impl SocketAddrV6 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_ip(&mut self, new_ip: Ipv6Addr) {
self.ip = new_ip;
}
@@ -484,7 +484,7 @@ impl SocketAddrV6 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_port(&mut self, new_port: u16) {
self.port = new_port;
}
@@ -532,7 +532,7 @@ impl SocketAddrV6 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_flowinfo(&mut self, new_flowinfo: u32) {
self.flowinfo = new_flowinfo;
}
@@ -575,7 +575,7 @@ impl SocketAddrV6 {
/// ```
#[inline]
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
pub const fn set_scope_id(&mut self, new_scope_id: u32) {
self.scope_id = new_scope_id;
}
Loading
Oops, something went wrong.