Skip to content
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

Tracking issue for FixedSizeArray trait #27778

Closed
alexcrichton opened this issue Aug 13, 2015 · 13 comments · Fixed by #84094
Closed

Tracking issue for FixedSizeArray trait #27778

alexcrichton opened this issue Aug 13, 2015 · 13 comments · Fixed by #84094
Labels
A-const-generics Area: const generics (parameters and arguments) A-slice Area: [T] B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. finished-final-comment-period The final comment period is finished for this PR / Issue. Libs-Tracked Libs issues that are tracked on the team's project board. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

This is a tracking issue for the unstable fixed_size_array feature in the standard library. This is likely to be deprecated and removed in favor of generic integers one day, and in the meantime there are not many consumers of it.

@alexcrichton alexcrichton added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. B-unstable Blocker: Implemented in the nightly compiler and unstable. labels Aug 13, 2015
@eefriedman
Copy link
Contributor

Note that the fixed_size_array feature specifically covers the FixedSizeArray trait. There's some other code in core::array, but it's all implicitly stable.

@bluss
Copy link
Member

bluss commented Aug 13, 2015

The FixedSizeArray trait would be great, except for many uses the ranges of sizes it's implemented for simply isn't what you need, and there is no way to expand it. Thus it is mostly useless in the current form.

@SimonSapin
Copy link
Contributor

Could the compiler magically have an "infinite" (generated on demand) number of impls of FixedSizeArray?

If that happens and the type parameter is made into an associated type (and maybe an associated const for the size is added), then most of the other impls that currently only go up to N=32 could be made generic impl<A: FixedSizeArray> … for A.

@bluss
Copy link
Member

bluss commented Aug 13, 2015

If/when the issue of using associated consts like consts is resolved, that is, allow [i32; A::LEN] to compile; then an infinite number of FixedSizeArray impls would give us the same thing as generic integer parameters.

This suggests to me that completing associated constants is basically the same problem as allowing generic integer parameters.

@oli-obk
Copy link
Contributor

oli-obk commented Aug 13, 2015

for now FixedSizeArray could be moved to a crate since it doesn't use any compiler magic anyway

@SimonSapin
Copy link
Contributor

@steveklabnik
Copy link
Member

Triage: no changes

@SimonSapin
Copy link
Contributor

Something did change in #28088: this trait is now implemented for all sizes:

unsafe impl<T, A: Unsize<[T]>> FixedSizeArray<T> for A

The Unsize trait is also unstable: #27732

@SimonSapin
Copy link
Contributor

I wrote rust-lang/rfcs#1915 about extending and stabilizing this trait.

@Mark-Simulacrum Mark-Simulacrum added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jul 22, 2017
@Mark-Simulacrum Mark-Simulacrum changed the title Tracking issue for core::array Tracking issue for FixedSizeArray Jan 16, 2018
@Mark-Simulacrum Mark-Simulacrum changed the title Tracking issue for FixedSizeArray Tracking issue for FixedSizeArray trait Jan 16, 2018
@KodrAus KodrAus added A-const-generics Area: const generics (parameters and arguments) A-slice Area: [T] Libs-Tracked Libs issues that are tracked on the team's project board. labels Jul 31, 2020
@Amanieu
Copy link
Member

Amanieu commented Mar 31, 2021

This trait isn't used anywhere and doesn't seem to be needed any more now that we have const generics.

@rfcbot fcp close

@rfcbot
Copy link

rfcbot commented Mar 31, 2021

Team member @Amanieu has proposed to close this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. labels Mar 31, 2021
@rfcbot
Copy link

rfcbot commented Apr 1, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Apr 1, 2021
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 11, 2021
@rfcbot
Copy link

rfcbot commented Apr 11, 2021

The final comment period, with a disposition to close, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@rfcbot rfcbot added the to-announce Announce this issue on triage meeting label Apr 11, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 11, 2021
…m-ou-se

Remove FixedSizeArray

Remove `FixedSizeArray` trait, it has been superseded by const generics.

Closes rust-lang#27778.
Amanieu added a commit to Amanieu/rust that referenced this issue Apr 11, 2021
@bors bors closed this as completed in 3ea5a9f Apr 12, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-slice Area: [T] B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. finished-final-comment-period The final comment period is finished for this PR / Issue. Libs-Tracked Libs issues that are tracked on the team's project board. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.