Skip to content

core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets#134689

Merged
bors merged 1 commit intorust-lang:masterfrom
RalfJung:ptr-swap-test
Dec 24, 2024
Merged

core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets#134689
bors merged 1 commit intorust-lang:masterfrom
RalfJung:ptr-swap-test

Conversation

@RalfJung
Copy link
Copy Markdown
Member

@RalfJung RalfJung commented Dec 23, 2024

Ensure that the pointer gets swapped correctly even if it is not stored at an aligned offset. This rules out implementations that copy things in a usize loop -- so our implementation needs to be adjusted to avoid such a loop when running in const context.

Part of #133668

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants