-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for const_swap_nonoverlapping #133668
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-easy-decisionIssue: The decision needed by the team is conjectured to be easy; this does not imply nominationIssue: The decision needed by the team is conjectured to be easy; this does not imply nominationT-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-easy-decisionIssue: The decision needed by the team is conjectured to be easy; this does not imply nominationIssue: The decision needed by the team is conjectured to be easy; this does not imply nominationT-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(const_swap_nonoverlapping)]This is a tracking issue for making
swap_nonoverlappingaconst fn.Public API
Steps / History
Blocking Issues
ptr::swap_nonoverlappinghas a limitation currently where it can fail when the data-to-swap contains pointers that cross the "element boundary" of such a swap (i.e.,count > 1and the pointer straddles the boundary between twoT). Here's an example of code that unexpectedly fails:The proper way to fix this is to implement rust-lang/const-eval#72.
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩