rust/library/core/tests
Dylan DPC 10aa3d3f89
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`.
2020-09-03 02:22:00 +02:00
..
fmt
hash
num flt2dec: properly handle uninitialized memory 2020-09-02 12:41:38 +02:00
alloc.rs
any.rs
array.rs Add drop check test & MaybeUninit::first_ptr_mut 2020-08-13 03:51:08 +00:00
ascii.rs enable align_to tests in Miri 2020-08-19 10:41:51 +02:00
atomic.rs
bool.rs
cell.rs
char.rs
clone.rs
cmp.rs
intrinsics.rs
iter.rs Use min_specialization in libcore 2020-08-19 20:08:02 +01:00
lazy.rs Make OnceCell<T> transparent to dropck 2020-08-18 00:34:54 +02:00
lib.rs Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
manually_drop.rs
mem.rs
nonzero.rs
ops.rs
option.rs Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
pattern.rs
ptr.rs enable align_to tests in Miri 2020-08-19 10:41:51 +02:00
result.rs Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
slice.rs enable align_to tests in Miri 2020-08-19 10:41:51 +02:00
str_lossy.rs
str.rs
time.rs
tuple.rs