-
Notifications
You must be signed in to change notification settings - Fork 19
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
ACP: Make <[[T; N]]>::flatten const #218
Labels
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
Comments
KamilaBorowska
added
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
labels
May 3, 2023
Thanks for the ACP! For an unstable method, I'm going to consider this something that can be done as a tweak under the existing tracking issue, and not something that needs to wait on a libs-api decision, given that the implementation change is trivial. I've approved the PR. libs-api folks, please feel free to yell at me if you disagree 🙃 |
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
May 3, 2023
Constify slice flatten method ACP: rust-lang/libs-team#218
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
May 3, 2023
Constify slice flatten method ACP: rust-lang/libs-team#218
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
May 3, 2023
Constify slice flatten method ACP: rust-lang/libs-team#218
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
May 3, 2023
Constify slice flatten method ACP: rust-lang/libs-team#218
This can now be closed. |
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
Jul 18, 2023
Constify slice flatten method ACP: rust-lang/libs-team#218
dtolnay
added
the
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
label
Nov 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ACP-accepted
API Change Proposal is accepted (seconded with no objections)
api-change-proposal
A proposal to add or alter unstable APIs in the standard libraries
T-libs-api
Proposal
Problem statement
Allow using
<[[T; N]]>::flatten
withinconst fn
.Motivation, use-cases
Could be useful for code like this where you have an array containing arrays (for instance from
u32::to_be_bytes
) to return an array. For example,Ipv6Addr::new
in standard library could make use of it.Solution sketches
Add
const
keyword. The current implementation is already const-compatible, and I don't see a reason why this would change.Links and related work
What happens now?
This issue is part of the libs-api team API change proposal process. Once this issue is filed the libs-api team will review open proposals in its weekly meeting. You should receive feedback within a week or two.
The text was updated successfully, but these errors were encountered: