rust/library/std
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 Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Rollup merge of #129329 - eduardosm:rc-from-mut-slice, r=dtolnay 2024-11-03 12:08:49 +01:00
tests Avoid shadowing user provided types or type aliases in thread_local! 2024-10-18 10:27:41 +08:00
build.rs enable f16 and f128 on windows-gnullvm targets 2024-10-05 23:55:39 +02:00
Cargo.toml Update compiler-builtins to 0.1.136 2024-10-26 18:43:08 -05:00