diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-19 17:47:48 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-04-29 10:40:56 +0200 |
| commit | 9f4abd313dfe3fbb0984d79a4a232009c582e9f5 (patch) | |
| tree | 33cbc14dc3e82464be6574cd21e13a8caa69eb75 /library/coretests | |
| parent | 1b8ab72680f36e783af84c1a3c4f8508572bd9f9 (diff) | |
| download | rust-9f4abd313dfe3fbb0984d79a4a232009c582e9f5.tar.gz rust-9f4abd313dfe3fbb0984d79a4a232009c582e9f5.zip | |
stabilize ptr::swap_nonoverlapping in const
Diffstat (limited to 'library/coretests')
| -rw-r--r-- | library/coretests/tests/lib.rs | 1 | ||||
| -rw-r--r-- | library/coretests/tests/ptr.rs | 4 |
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. }; } |
