-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document behavior of wide to thin pointer casts for DSTs #1448
Comments
This is not contentious at all. But indeed it would be better to state this explicitly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related #66, rust-lang/rust#81513
The following casts are considered "true casts" per the reference:
*const [T] as *const U
*const dyn T as *const U
Today they are implemented so that the data pointer is returned and metadata discarded. However, this behavior does not appear to be documented anywhere authoritative.
In the rfc to
ptr_metadata
(Tracking issue: rust-lang/rust#81513) the following text was proposed, but as of today hasn't made it into the unstable Pointee trait:Should this be documented in the reference or is the semantics contentious?
The text was updated successfully, but these errors were encountered: