diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-09 13:38:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 13:38:33 +0100 |
| commit | 295ef3a3367dfbb1eef6ea4d259e546053796f6f (patch) | |
| tree | 962249f14c25b658e2aa86ed2b77734e07f8fed6 /compiler/rustc_codegen_gcc | |
| parent | 51001b35bd4079ea40536a264e054eec9b4f11bd (diff) | |
| parent | 1a966235138ad68967aa0892aa0621315081e4e8 (diff) | |
| download | rust-295ef3a3367dfbb1eef6ea4d259e546053796f6f.tar.gz rust-295ef3a3367dfbb1eef6ea4d259e546053796f6f.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
