-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tracking Issue for ptr_const_cast #92675
Comments
I like this function (as it allows a codebase to avoid uses of As noted in the documentation, a |
I'm starting to like |
Once they're called (However, they currently document that as an explicit feature, not changing the type.) |
@cuviper yes, not changing the type is the main point because it protects against refactors. You can already do both with |
Shall we rename these to @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This renames the methods to use the `cast_` prefix instead of `as_` to make it more readable and avoid confusion with `<*mut T>::as_mut()` which is `unsafe` and returns a reference. See rust-lang#92675
…cast, r=scottmcm Rename `<*{mut,const} T>::as_{const,mut}` to `cast_` This renames the methods to use the `cast_` prefix instead of `as_` to make it more readable and avoid confusion with `<*mut T>::as_mut()` which is `unsafe` and returns a reference. Sorry, didn't notice ACP process exists, opened rust-lang/libs-team#51 See rust-lang#92675
…cast, r=scottmcm Rename `<*{mut,const} T>::as_{const,mut}` to `cast_` This renames the methods to use the `cast_` prefix instead of `as_` to make it more readable and avoid confusion with `<*mut T>::as_mut()` which is `unsafe` and returns a reference. Sorry, didn't notice ACP process exists, opened rust-lang/libs-team#51 See rust-lang#92675
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
…r=m-ou-se Stabilize ptr_const_cast This stabilizes `ptr_const_cast` feature as was decided in a recent [FCP](rust-lang#92675 (comment)) Closes rust-lang#92675
This stabilizes `ptr_const_cast` feature as was decided in a recent [FCP](rust-lang/rust#92675 (comment)) Closes #92675
Stabilize ptr_const_cast This stabilizes `ptr_const_cast` feature as was decided in a recent [FCP](rust-lang/rust#92675 (comment)) Closes #92675
Feature gate:
#![feature(ptr_const_cast)]
This is a tracking issue for methods on pointers for casting constness without changing the type
Public API
Steps / History
Unresolved Questions
Resolved to use*mut T
also already hasas_mut()
which does something different and has a different signature, adding a mehod of the same name to*const T
could be confusing, so maybe a better name should be used.cast_const
/cast_mut
was suggested.cast_*
The text was updated successfully, but these errors were encountered: