rust/library/alloc
Matthias Krüger 957f6c3973
Rollup merge of #129329 - eduardosm:rc-from-mut-slice, r=dtolnay
Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`

ACP: https://github.com/rust-lang/libs-team/issues/424

New API:

```rust
impl<T: Clone> From<&mut [T]> for Box<[T]>
impl From<&mut str> for Box<str>
impl From<&mut CStr> for Box<CStr>
impl From<&mut OsStr> for Box<OsStr>
impl From<&mut Path> for Box<Path>

impl<T: Clone> From<&mut [T]> for Rc<[T]>
impl From<&mut str> for Rc<str>
impl From<&mut CStr> for Rc<CStr>
impl From<&mut OsStr> for Rc<OsStr>
impl From<&mut Path> for Rc<Path>

impl<T: Clone> From<&mut [T]> for Arc<[T]>
impl From<&mut str> for Arc<str>
impl From<&mut CStr> for Arc<CStr>
impl From<&mut OsStr> for Arc<OsStr>
impl From<&mut Path> for Arc<Path>
```

Since they are trait implementations, I think these are insta-stable.

As mentioned in https://github.com/rust-lang/libs-team/issues/424#issuecomment-2299415749, a crater run might be needed.
2024-11-03 12:08:49 +01:00
..
benches move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
src Rollup merge of #129329 - eduardosm:rc-from-mut-slice, r=dtolnay 2024-11-03 12:08:49 +01:00
tests Auto merge of #132231 - lukas-code:rc-plug-leaks, r=tgross35 2024-10-29 16:26:00 +00:00
Cargo.toml Update compiler-builtins to 0.1.136 2024-10-26 18:43:08 -05:00