1

Implemented const casts of raw pointers by Kixunil · Pull Request #92657 · rust-...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/92657
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

Kixunil commented 9 days ago

This adds as_mut() method for *const T and as_const() for *mut T
which are intended to make casting of consts safer. This was discussed
in the internals discussion.

Given that this is a simple change and multiple people agreed to it including @RalfJung I decided to go ahead and open the PR.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK