rust/library/core/src
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
..
alloc Rollup merge of #97034 - fee1-dead-contrib:layout-hash, r=dtolnay 2022-05-28 08:45:51 +02:00
array Stabilize {slice,array}::from_ref 2022-05-24 22:33:31 +04:00
async_iter Add Stream alias for AsyncIterator 2022-03-15 20:59:13 -07:00
char No need to check the assert all the time. 2022-04-16 19:30:23 +01:00
convert Warn on unused doc(hidden) on trait impl items 2022-05-08 22:53:14 +02:00
ffi Finish bumping stage0 2022-05-27 07:36:17 -04:00
fmt Remove (fn(...) -> ...) -> usize -> *const () -> usize cast 2022-05-29 13:11:51 +04:00
future Rename IntoFuture::Future to IntoFuture::IntoFuture 2022-03-10 20:51:52 +01:00
hash Reword safety comments in core/hash/sip.rs 2022-05-30 01:06:08 -07:00
iter libcore: Add iter::from_generator which is like iter::from_fn, but for coroutines instead of functions 2022-05-27 01:51:31 +03:00
macros Make write/print macros eagerly drop temporaries 2022-05-22 16:11:08 -07:00
mem Implement Hash for core::alloc::Layout 2022-05-14 14:44:42 +10:00
num Corrected EBNF grammar for from_str 2022-05-28 18:24:34 -04:00
ops Finish bumping stage0 2022-05-27 07:36:17 -04:00
panic Auto merge of #96348 - overdrivenpotato:inline-location, r=the8472 2022-04-30 16:33:12 +00:00
prelude Create 2024 edition 2022-04-02 02:45:49 -04:00
ptr Rollup merge of #97420 - WaffleLapkin:no_oxford_casts_qqq, r=Mark-Simulacrum 2022-06-02 15:26:57 +02:00
slice Rollup merge of #97366 - WaffleLapkin:stabilize_array_slice_from_ref, r=dtolnay 2022-06-03 11:18:23 +02:00
str Rollup merge of #97190 - SylvainDe:master, r=Dylan-DPC 2022-05-21 11:39:48 +02:00
sync Rollup merge of #97026 - Nilstrieb:make-atomic-debug-relaxed, r=scottmcm 2022-05-25 07:31:42 +02:00
task Rollup merge of #93966 - rkuhn:patch-1, r=tmandry 2022-05-25 07:08:41 +09:00
unicode Add unicode fast path to is_printable 2022-05-31 10:51:35 +02:00
any.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
ascii.rs Inline <EscapeDefault as Iterator>::next 2022-03-10 15:35:22 +01:00
asserting.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
bool.rs Stabilize bool::then_some 2022-05-04 13:22:08 +02:00
borrow.rs Make Borrow and BorrowMut impls const 2021-12-04 21:57:39 +09:00
cell.rs Stabilize cell_filter_map 2022-05-23 18:04:53 +09:00
clone.rs Remove #[default..] and add #[const_trait] 2022-05-30 08:52:24 +00:00
cmp.rs Remove #[default..] and add #[const_trait] 2022-05-30 08:52:24 +00:00
default.rs Add documentation 2022-04-07 20:03:24 -04:00
hint.rs Clarify unreachable_unchecked docs 2022-05-06 09:34:41 +02:00
internal_macros.rs ignore a doctest for the non-exported macro 2022-05-03 18:33:56 +09:00
intrinsics.rs Update intrinsics.rs 2022-05-30 22:38:29 +00:00
lazy.rs Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
lib.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
marker.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
option.rs Rollup merge of #96033 - yaahc:expect-elaboration, r=scottmcm 2022-05-26 20:59:40 +02:00
panic.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
panicking.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
pin.rs Fix formatting error in pin.rs docs 2022-04-10 12:41:31 -07:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs.rs Rollup merge of #97321 - RalfJung:int-to-fnptr, r=Dylan-DPC 2022-05-24 15:58:26 +02:00
result.rs Rollup merge of #96033 - yaahc:expect-elaboration, r=scottmcm 2022-05-26 20:59:40 +02:00
time.rs Rollup merge of #96051 - newpavlov:duration_rounding, r=nagisa,joshtriplett 2022-05-26 20:15:07 -07:00
tuple.rs Implement tuples using recursion 2022-04-12 16:23:36 -03:00
unit.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00