rust/library/core/src
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
..
alloc Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu 2020-08-26 10:44:28 +00:00
array Add [T; N]::as_[mut_]slice 2020-08-30 21:08:17 +02:00
char Use intra-doc-links in core::{char, macros, fmt} 2020-08-24 00:13:23 +02:00
convert add i32::MAX link 2020-08-30 17:07:50 +05:30
fmt flt2dec: properly handle uninitialized memory 2020-09-02 12:41:38 +02:00
future Remove unnecessary intra-doc link 2020-08-27 19:42:23 -07:00
hash Switch to intra-doc links in core::hash 2020-08-27 12:09:50 -07:00
iter Rollup merge of #76221 - camelid:cleanup-iter-for, r=jyn514 2020-09-01 18:24:48 -07:00
macros Rollup merge of #74880 - chrisduerr:fix_matches, r=dtolnay 2020-09-01 18:24:23 -07:00
mem Auto merge of #76047 - Dylan-DPC:rename/maybe, r=RalfJung 2020-09-01 05:41:22 +00:00
num flt2dec: properly handle uninitialized memory 2020-09-02 12:41:38 +02:00
ops apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
prelude
ptr Rollup merge of #75917 - poliorcetics:intra-doc-core-nonnull, r=jyn514 2020-08-30 01:43:50 +02:00
slice Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa 2020-08-31 15:55:13 +00:00
str Disambiguate char -> prim@char for core 2020-08-23 22:40:20 -04:00
sync Use intra-doc links for bool 2020-08-28 17:30:05 +02:00
task apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
unicode
any.rs Use intra-doc links 2020-08-14 20:50:38 +02:00
ascii.rs
bool.rs
borrow.rs Remove AsRef link as it is in the prelude 2020-08-10 20:29:20 +02:00
cell.rs add track_caller to RefCell::{borrow, borrow_mut} 2020-07-28 15:45:25 -04:00
clone.rs Improve readability 2020-09-01 19:56:32 +02:00
cmp.rs Revert #75463 2020-08-31 10:22:14 -07:00
default.rs
ffi.rs Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
hint.rs Fix typo in std::hint::black_box docs 2020-08-27 01:16:18 +02:00
internal_macros.rs
intrinsics.rs Don't import atomics unless supported by the platform 2020-08-23 23:11:47 -04:00
lazy.rs
lib.rs Stabilize feature const_ordering 2020-08-30 23:48:54 +02:00
marker.rs Auto merge of #75947 - pietroalbini:bootstrap-update, r=Mark-Simulacrum 2020-08-27 09:24:51 +00:00
option.rs apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
panic.rs Enhance wording 2020-09-01 18:16:34 +02:00
panicking.rs
pin.rs apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
primitive.rs
raw.rs Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
result.rs apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
time.rs Add link for Duration 2020-08-09 23:26:42 +02:00
tuple.rs
unit.rs