Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c33e9d6

Browse files
authoredMar 7, 2025
Rollup merge of #138129 - RalfJung:stabilize-const-things, r=tgross35
Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: #132241 FCP for const_sockaddr_setters: #131714 Fixes #132241 Fixes #131714 Cc ``@rust-lang/wg-const-eval``
2 parents a928c15 + 8f8c7fc commit c33e9d6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed
 

‎library/core/src/char/methods.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl char {
337337
/// '1'.is_digit(1);
338338
/// ```
339339
#[stable(feature = "rust1", since = "1.0.0")]
340-
#[rustc_const_unstable(feature = "const_char_classify", issue = "132241")]
340+
#[rustc_const_stable(feature = "const_char_classify", since = "CURRENT_RUSTC_VERSION")]
341341
#[inline]
342342
pub const fn is_digit(self, radix: u32) -> bool {
343343
self.to_digit(radix).is_some()
@@ -886,7 +886,7 @@ impl char {
886886
/// ```
887887
#[must_use]
888888
#[stable(feature = "rust1", since = "1.0.0")]
889-
#[rustc_const_unstable(feature = "const_char_classify", issue = "132241")]
889+
#[rustc_const_stable(feature = "const_char_classify", since = "CURRENT_RUSTC_VERSION")]
890890
#[inline]
891891
pub const fn is_whitespace(self) -> bool {
892892
match self {

‎library/core/src/net/socket_addr.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl SocketAddr {
200200
/// ```
201201
#[inline]
202202
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
203-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
203+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
204204
pub const fn set_ip(&mut self, new_ip: IpAddr) {
205205
// `match (*self, new_ip)` would have us mutate a copy of self only to throw it away.
206206
match (self, new_ip) {
@@ -244,7 +244,7 @@ impl SocketAddr {
244244
/// ```
245245
#[inline]
246246
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
247-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
247+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
248248
pub const fn set_port(&mut self, new_port: u16) {
249249
match *self {
250250
SocketAddr::V4(ref mut a) => a.set_port(new_port),
@@ -350,7 +350,7 @@ impl SocketAddrV4 {
350350
/// ```
351351
#[inline]
352352
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
353-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
353+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
354354
pub const fn set_ip(&mut self, new_ip: Ipv4Addr) {
355355
self.ip = new_ip;
356356
}
@@ -386,7 +386,7 @@ impl SocketAddrV4 {
386386
/// ```
387387
#[inline]
388388
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
389-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
389+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
390390
pub const fn set_port(&mut self, new_port: u16) {
391391
self.port = new_port;
392392
}
@@ -448,7 +448,7 @@ impl SocketAddrV6 {
448448
/// ```
449449
#[inline]
450450
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
451-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
451+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
452452
pub const fn set_ip(&mut self, new_ip: Ipv6Addr) {
453453
self.ip = new_ip;
454454
}
@@ -484,7 +484,7 @@ impl SocketAddrV6 {
484484
/// ```
485485
#[inline]
486486
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
487-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
487+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
488488
pub const fn set_port(&mut self, new_port: u16) {
489489
self.port = new_port;
490490
}
@@ -532,7 +532,7 @@ impl SocketAddrV6 {
532532
/// ```
533533
#[inline]
534534
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
535-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
535+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
536536
pub const fn set_flowinfo(&mut self, new_flowinfo: u32) {
537537
self.flowinfo = new_flowinfo;
538538
}
@@ -575,7 +575,7 @@ impl SocketAddrV6 {
575575
/// ```
576576
#[inline]
577577
#[stable(feature = "sockaddr_setters", since = "1.9.0")]
578-
#[rustc_const_unstable(feature = "const_sockaddr_setters", issue = "131714")]
578+
#[rustc_const_stable(feature = "const_sockaddr_setters", since = "CURRENT_RUSTC_VERSION")]
579579
pub const fn set_scope_id(&mut self, new_scope_id: u32) {
580580
self.scope_id = new_scope_id;
581581
}

0 commit comments

Comments
 (0)
Failed to load comments.