diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-06-03 11:18:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-03 11:18:23 +0200 |
| commit | 025cf96615f44be6a75f82df50fa0f9e0e569b96 (patch) | |
| tree | fdf2387005bf3439941291130c0e638895d455ec /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff | |
| parent | f5507aa881921f1cef42851ae976317ddb0c09ae (diff) | |
| parent | 7a09b8a7b52e5f9e9f7145657629bca9d89f16f0 (diff) | |
| download | rust-025cf96615f44be6a75f82df50fa0f9e0e569b96.tar.gz rust-025cf96615f44be6a75f82df50fa0f9e0e569b96.zip | |
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
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
