-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
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 ↩