about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-24 09:55:21 +0000
committerbors <bors@rust-lang.org>2025-09-24 09:55:21 +0000
commite9385f9eea0221ef295a188d49d16f8f5189abf1 (patch)
tree933de5ad6cddfff49f5ea48b16cfff7f00be4b59 /library/core/src
parent3e887f5faa673bd1f9f6c95fc5d201598818add4 (diff)
parent6617536d147d4bb5b3a15aebad265bc847f68b3e (diff)
downloadrust-e9385f9eea0221ef295a188d49d16f8f5189abf1.tar.gz
rust-e9385f9eea0221ef295a188d49d16f8f5189abf1.zip
Auto merge of #146946 - matthiaskrgr:rollup-fsmrqez, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#146818 (constify {float}::total_cmp())
 - rust-lang/rust#146896 (rustc-dev-guide subtree update)
 - rust-lang/rust#146898 (Update books)
 - rust-lang/rust#146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered)
 - rust-lang/rust#146904 (rust-lang/rust#140368 Mutex/RwLock/ReentrantLock::data_ptr to be const fn)
 - rust-lang/rust#146907 (add regression test for issue 146537)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/num/f128.rs3
-rw-r--r--library/core/src/num/f16.rs3
-rw-r--r--library/core/src/num/f32.rs3
-rw-r--r--library/core/src/num/f64.rs3
4 files changed, 8 insertions, 4 deletions
diff --git a/library/core/src/num/f128.rs b/library/core/src/num/f128.rs
index 6088fb6fa17..b0c9e9ef05e 100644
--- a/library/core/src/num/f128.rs
+++ b/library/core/src/num/f128.rs
@@ -1196,7 +1196,8 @@ impl f128 {
     #[inline]
     #[must_use]
     #[unstable(feature = "f128", issue = "116909")]
-    pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
+    #[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
+    pub const fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i128;
         let mut right = other.to_bits() as i128;
 
diff --git a/library/core/src/num/f16.rs b/library/core/src/num/f16.rs
index 3f66c5973d4..56db92f91fc 100644
--- a/library/core/src/num/f16.rs
+++ b/library/core/src/num/f16.rs
@@ -1175,7 +1175,8 @@ impl f16 {
     #[inline]
     #[must_use]
     #[unstable(feature = "f16", issue = "116909")]
-    pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
+    #[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
+    pub const fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i16;
         let mut right = other.to_bits() as i16;
 
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index ebce89e5b3d..57be4d8d30a 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -1353,9 +1353,10 @@ impl f32 {
     /// }
     /// ```
     #[stable(feature = "total_cmp", since = "1.62.0")]
+    #[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
     #[must_use]
     #[inline]
-    pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
+    pub const fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i32;
         let mut right = other.to_bits() as i32;
 
diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs
index 91e3949fc39..748956ae980 100644
--- a/library/core/src/num/f64.rs
+++ b/library/core/src/num/f64.rs
@@ -1351,9 +1351,10 @@ impl f64 {
     /// }
     /// ```
     #[stable(feature = "total_cmp", since = "1.62.0")]
+    #[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
     #[must_use]
     #[inline]
-    pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
+    pub const fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i64;
         let mut right = other.to_bits() as i64;