-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Tracking Issue for feature(ptr_to_from_bits) #91126
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 RFCT-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 RFCT-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(ptr_to_from_bits)]This is a tracking issue for
<*const T>::from_bits,<*mut T>::from_bits,<*const T>::to_bits, and<*mut T>::to_bits.These, like the stable
<*const T>::castand<*mut T>::cast, is proposed as a method for one of the many specific things thatascan do to help increase readability of which of those things is happening, as well as to be able to give better compilation errors (or lints) for suspicious code patterns that aren't necessarily wrong. (For example,p as u32is legal but suspicious, as it's possible it was meant to be*p as u32. By having the method,p.to_bits() as u32is unambiguous.)See the conversation in https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Adding.20methods.20as.20more.20specific.20versions.20of.20.60as.60/near/238391074
Public API
Steps / History
<*{const|mut} T>::{to|from}_bits#91127Unresolved Questions