-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array::split_array*(): return arrays instead of slices #111829
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Splitting a slice returns an Option, akin to get().
This turns invalid split indices into post-mono errors. In the future, these will return e.g. (&[T; M], &[T; N-M]) so that an invalid index becomes a type error.
This also turns post-mono errors due to invalid indices into type errors.
266f250
to
07929ca
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
@Dylan-DPC I think this should be closed. The part that changes functions to accept an I think a partial stabilization like I propose in #90091 (comment) is a likely path forward, but this PR shouldn't be accepted as-is |
Yeah, closing this, it will need to be reimplemented according to #117561 once |
This is an update to #90091, spun out of #109049, which
split_array_*()
methods onarray
return arrays instead of slicesarray::split_array()
.It is blocked on support for
#![feature(generic_const_exprs)]
.The first four commits are from #109049.
@rustbot label +S-blocked