rust/library/core/src/slice
Dylan DPC 025cf96615
Rollup merge of #97366 - WaffleLapkin:stabilize_array_slice_from_ref, r=dtolnay
Stabilize `{slice,array}::from_ref`

This PR stabilizes the following APIs as `const` functions in Rust `1.63`:
```rust
// core::array
pub const fn from_ref<T>(s: &T) -> &[T; 1];

// core::slice
pub const fn from_ref<T>(s: &T) -> &[T];
```

Note that the `mut` versions are not stabilized as unique references (`&mut _`) are [unstable in const context].

FCP: https://github.com/rust-lang/rust/issues/90206#issuecomment-1134586665

r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs

[unstable in const context]: https://github.com/rust-lang/rust/issues/57349
2022-06-03 11:18:23 +02:00
..
iter Warn on unused doc(hidden) on trait impl items 2022-05-08 22:53:14 +02:00
ascii.rs Make some usize-typed masks definition agnostic to the size of usize 2022-04-15 17:04:59 +02:00
cmp.rs make memcmp return a value of c_int_width instead of i32 2022-04-02 17:21:08 -07:00
index.rs Fix a mistake in SliceIndex's documentation 2022-05-24 13:22:41 -04:00
iter.rs Warn on unused doc(hidden) on trait impl items 2022-05-08 22:53:14 +02:00
memchr.rs Make some usize-typed masks definition agnostic to the size of usize 2022-04-15 17:04:59 +02:00
mod.rs Remove memset alias from fill_with. 2022-05-30 16:26:00 -07:00
raw.rs Rollup merge of #97366 - WaffleLapkin:stabilize_array_slice_from_ref, r=dtolnay 2022-06-03 11:18:23 +02:00
rotate.rs Fix a bunch of typos 2021-12-14 16:40:43 +01:00
sort.rs mark FIXMES for all the places found that are probably offset_from 2022-03-29 20:18:28 -04:00
specialize.rs Remove size_of == 1 case from fill specialization. 2021-08-09 19:25:28 +02:00