]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #90377 - WaffleLapkin:const_slice_from_raw_parts, r=oli-obk
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 30 Oct 2021 12:37:01 +0000 (14:37 +0200)
committerGitHub <noreply@github.com>
Sat, 30 Oct 2021 12:37:01 +0000 (14:37 +0200)
Make `core::slice::from_raw_parts[_mut]` const

Responses to #90012 seem to allow ``@rust-lang/wg-const-eval`` to decide on use of `const_eval_select`, so we can make `core::slice::from_raw_parts[_mut]` const :)

---
This PR marks the following APIs as const:
```rust
// core::slice
pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T];
pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T];
```
---

Resolves #90011
r? ``@oli-obk``

1  2 
library/core/src/lib.rs

Simple merge