]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #95594 - the8472:raw_slice_methods, r=yaahc
authorYuki Okushi <jtitor@2k36.org>
Wed, 1 Jun 2022 21:44:25 +0000 (06:44 +0900)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 21:44:25 +0000 (06:44 +0900)
commit3ed9bbe9700f8ea46528dedb9fb242167b01a802
treee8951fc6544c5f49599533eea00aeadd4cfb919d
parentb5a2d27f8f59df6f2162e61461b41d6116d4815e
parentb0ca46e90d1304512decc1f9c3d50422e109080c
Rollup merge of #95594 - the8472:raw_slice_methods, r=yaahc

Additional `*mut [T]` methods

Split out from #94247

This adds the following methods to raw slices that already exist on regular slices

* `*mut [T]::is_empty`
* `*mut [T]::split_at_mut`
* `*mut [T]::split_at_mut_unchecked`

These methods reduce the amount of unsafe code needed to migrate `ChunksMut` and related iterators
to raw slices (#94247)

r? `@m-ou-se`
library/core/src/ptr/mut_ptr.rs