granite-rust/library/core
Matthias Krüger 295ef3a336
Rollup merge of #92657 - Kixunil:ptr_as_const_mut, r=m-ou-se
Implemented const casts of raw pointers

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][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.

[discussion]: https://internals.rust-lang.org/t/casting-constness-can-be-risky-heres-a-simple-fix/15933
2022-01-09 13:38:33 +01:00
..
benches Auto merge of #88788 - falk-hueffner:speedup-int-log10-branchless, r=joshtriplett 2021-10-12 03:18:54 +00:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #92657 - Kixunil:ptr_as_const_mut, r=m-ou-se 2022-01-09 13:38:33 +01:00
tests Auto merge of #92226 - woppopo:const_black_box, r=joshtriplett 2021-12-24 10:02:54 +00:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00