What if we just add <[MaybeUninit<T>; N]>::assume_init
directly?
#104475
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.
I recall (though can't find where) libs-api being unsatisfied with the
transpose
approach for this, so I figured I'd toss out this as another alternative.Now that we don't need lang item hacks to add inherent impl blocks for built-in types, we can just add
That seems pretty reasonable -- the odds of another meaning for
assume_init
on generic overlays that might overlap feel low to me, and another specific meaning of it for arrays of a different type would still be possible.If this is worth doing, I can add analogous things to
&[MaybeUninit<T>]
and&mut [MaybeUninit<T>]
too.cc #96097
r? @m-ou-se