about summary refs log tree commit diff
path: root/library/coretests
diff options
context:
space:
mode:
authorEvgenii Zheltonozhskii <zheltonozhskiy@gmail.com>2025-09-12 12:39:31 +0300
committerEvgenii Zheltonozhskii <zheltonozhskiy@gmail.com>2025-09-12 12:39:31 +0300
commitff9b1c1d285821fabe3cbf904fc407d62d95fbdc (patch)
tree03074c880ddea836894b59a24bd0ffb8f690e774 /library/coretests
parent8e2ed71effd5f81bff319c0c7adaca42084e2a71 (diff)
downloadrust-ff9b1c1d285821fabe3cbf904fc407d62d95fbdc.tar.gz
rust-ff9b1c1d285821fabe3cbf904fc407d62d95fbdc.zip
Constify Eq, Ord, PartialOrd
Diffstat (limited to 'library/coretests')
-rw-r--r--library/coretests/tests/cmp.rs6
-rw-r--r--library/coretests/tests/lib.rs1
2 files changed, 3 insertions, 4 deletions
diff --git a/library/coretests/tests/cmp.rs b/library/coretests/tests/cmp.rs
index 6c4e2146f91..55e35a4a725 100644
--- a/library/coretests/tests/cmp.rs
+++ b/library/coretests/tests/cmp.rs
@@ -215,19 +215,18 @@ fn cmp_default() {
     assert_eq!(Fool(false), Fool(true));
 }
 
-/* FIXME(#110395)
 mod const_cmp {
     use super::*;
 
     struct S(i32);
 
-    impl PartialEq for S {
+    impl const PartialEq for S {
         fn eq(&self, other: &Self) -> bool {
             self.0 == other.0
         }
     }
 
-    impl PartialOrd for S {
+    impl const PartialOrd for S {
         fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
             let ret = match (self.0, other.0) {
                 (a, b) if a > b => Ordering::Greater,
@@ -247,4 +246,3 @@ mod const_cmp {
     const _: () = assert!(S(0) < S(1));
     const _: () = assert!(S(1) > S(0));
 }
-*/
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index 1bdaa6965f6..04fa0aeba65 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -15,6 +15,7 @@
 #![feature(cfg_target_has_reliable_f16_f128)]
 #![feature(char_max_len)]
 #![feature(clone_to_uninit)]
+#![feature(const_cmp)]
 #![feature(const_convert)]
 #![feature(const_destruct)]
 #![feature(const_eval_select)]