about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/debug.rs
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2021-12-02 18:04:33 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2021-12-02 18:14:37 -0800
commit92c8317d2ae45a86b632b24996cd29a30d0dc3ce (patch)
treebedcfc1d0be8f146cf69e48eccea475b42275acf /compiler/rustc_mir_transform/src/coverage/debug.rs
parentff23ad3179014ba258f2b540fb39dd0f26852b7a (diff)
downloadrust-92c8317d2ae45a86b632b24996cd29a30d0dc3ce.tar.gz
rust-92c8317d2ae45a86b632b24996cd29a30d0dc3ce.zip
Add `[T]::as_simd(_mut)`
SIMD-style optimizations are the most common use for `[T]::align_to(_mut)`, but that's `unsafe`.  So these are *safe* wrappers around it, now that we have the `Simd` type available, to make it easier to use.

```rust
impl [T] {
    pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T]);
    pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T]);
}
```
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions