Rollup of 3 pull requests#152386
Closed
JonathanBrouwer wants to merge 10 commits intorust-lang:mainfrom
Closed
Conversation
The derived `T: Copy` constraint is not appropriate for an iterator by reference, but we generally do not want `Copy` on iterators anyway.
This implementation doesn't need the derived `T: Clone`.
- `impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` - `impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` - `impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` - `impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` - `impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` - `impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]` - `impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]>` - `impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]>` - `impl<T> AsRef<[Cell<T>]> for Cell<[T]>`
…anieu Align `ArrayWindows` trait impls with `Windows` With `slice::ArrayWindows` getting ready to stabilize in 1.94, I noticed that it currently has some differences in trait implementations compared to `slice::Windows`, and I think we should align these. - Remove `derive(Copy)` -- we generally don't want `Copy` for iterators at all, as this is seen as a footgun (e.g. rust-lang#21809). This is obviously a breaking change though, so we should only remove this if we also backport the removal before it's stable. Otherwise, it should at least be replaced by a manual impl without requiring `T: Copy`. - Manually `impl Clone`, simply to avoid requiring `T: Clone`. - `impl FusedIterator`, because it is trivially so. The `since = "1.94.0"` assumes we'll backport this, otherwise we should change that to the "current" placeholder. - `impl TrustedLen`, because we can trust our implementation. - `impl TrustedRandomAccess`, because the required `__iterator_get_unchecked` method is straightforward. r? libs-api @rustbot label beta-nominated (at least for the `Copy` removal, but we could be more selective about the rest).
std: introduce path normalize methods at top of `std::path` Closes rust-lang#142931 Mention other methods that call `conponents` and `canonicalize` that fully normalize path. And fix two typo. r? libs
…ait_impls, r=tgross35 Add some conversion trait impls - `impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]>` (equivalent of `as_array_of_cells`, cc rust-lang#88248) - `impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]>` - `impl<T> AsRef<[Cell<T>]> for Cell<[T]>` (equivalent of `as_slice_of_cells`) @rustbot label T-libs-api needs-fcp -T-libs I’ve tried to only add impls that are unlikely to cause single-applicable-impl inference breakage.
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
ArrayWindowstrait impls withWindows#151613 (AlignArrayWindowstrait impls withWindows)std::path#142957 (std: introduce path normalize methods at top ofstd::path)r? @ghost
Create a similar rollup