diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-09-03 02:22:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-03 02:22:00 +0200 |
| commit | 10aa3d3f89195f6cab93700f2514744c814a4881 (patch) | |
| tree | ab6ffe562b4e9b637b5f7abf6ef7d1b47440fa93 /src/rustllvm/CoverageMappingWrapper.cpp | |
| parent | 536b0c0c9051f879e473f1040f94773ed070ebe9 (diff) | |
| parent | d7afe2a223ab0a118bcdae39e8e2affbccaa61ae (diff) | |
| download | rust-10aa3d3f89195f6cab93700f2514744c814a4881.tar.gz rust-10aa3d3f89195f6cab93700f2514744c814a4881.zip | |
Rollup merge of #76120 - LukasKalbertodt:add-as-slice-method-to-array, r=Mark-Simulacrum
Add `[T; N]::as_[mut_]slice`
Part of me trying to populate arrays with a couple of basic useful methods, like slices already have. The ability to add methods to arrays were added in #75212. Tracking issue: #76118
This adds:
```rust
impl<T, const N: usize> [T; N] {
pub fn as_slice(&self) -> &[T];
pub fn as_mut_slice(&mut self) -> &mut [T];
}
```
These methods are like the ones on `std::array::FixedSizeArray` and in the crate `arraytools`.
Diffstat (limited to 'src/rustllvm/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
