about summary refs log tree commit diff
path: root/library/coretests
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-02-19 17:47:48 +0100
committerRalf Jung <post@ralfj.de>2025-04-29 10:40:56 +0200
commit9f4abd313dfe3fbb0984d79a4a232009c582e9f5 (patch)
tree33cbc14dc3e82464be6574cd21e13a8caa69eb75 /library/coretests
parent1b8ab72680f36e783af84c1a3c4f8508572bd9f9 (diff)
downloadrust-9f4abd313dfe3fbb0984d79a4a232009c582e9f5.tar.gz
rust-9f4abd313dfe3fbb0984d79a4a232009c582e9f5.zip
stabilize ptr::swap_nonoverlapping in const
Diffstat (limited to 'library/coretests')
-rw-r--r--library/coretests/tests/lib.rs1
-rw-r--r--library/coretests/tests/ptr.rs4
2 files changed, 4 insertions, 1 deletions
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index ef548971aaf..195fe3890db 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -15,7 +15,6 @@
 #![feature(char_max_len)]
 #![feature(clone_to_uninit)]
 #![feature(const_eval_select)]
-#![feature(const_swap_nonoverlapping)]
 #![feature(const_trait_impl)]
 #![feature(core_intrinsics)]
 #![feature(core_intrinsics_fallbacks)]
diff --git a/library/coretests/tests/ptr.rs b/library/coretests/tests/ptr.rs
index 7d6e4eac1e2..bb60fb07468 100644
--- a/library/coretests/tests/ptr.rs
+++ b/library/coretests/tests/ptr.rs
@@ -949,6 +949,10 @@ fn test_const_swap_ptr() {
         // Make sure they still work.
         assert!(*s1.0.ptr == 1);
         assert!(*s2.0.ptr == 666);
+
+        // This is where we'd swap again using a `u8` type and a `count` of `size_of::<T>()` if it
+        // were not for the limitation of `swap_nonoverlapping` around pointers crossing multiple
+        // elements.
     };
 }