5

Github Tracking issue for FixedSizeArray trait · Issue #27778 · rust-lang/rust ·...

 3 years ago
source link: https://github.com/rust-lang/rust/issues/27778
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

New issue

Tracking issue for FixedSizeArray trait #27778

alexcrichton opened this issue on Aug 13, 2015 · 13 comments

· May be fixed by #84094

Tracking issue for FixedSizeArray trait #27778

alexcrichton opened this issue on Aug 13, 2015 · 13 comments

· May be fixed by #84094

Comments

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.

Copy link

Contributor

eefriedman commented on Aug 13, 2015

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.

Copy link

Member

bluss commented on 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.

Copy link

Contributor

SimonSapin commented on Aug 13, 2015

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.

Copy link

Member

bluss commented on 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.

Copy link

Contributor

oli-obk commented on Aug 13, 2015

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

Triage: no changes

Copy link

Contributor

SimonSapin commented on Feb 21, 2017

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

Copy link

Contributor

SimonSapin commented on Feb 21, 2017

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

Mark-Simulacrum

changed the title Tracking issue for core::array

Tracking issue for FixedSizeArray

on Jan 16, 2018

Mark-Simulacrum

changed the title Tracking issue for FixedSizeArray

Tracking issue for FixedSizeArray trait

on Jan 16, 2018

Copy link

Contributor

Amanieu commented 11 days ago

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

@rfcbot fcp close

Copy link

rfcbot commented 11 days ago

edited by m-ou-se

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.

Copy link

rfcbot commented 10 days ago

bellThis is now entering its final comment period, as per the review above. bell

Copy link

rfcbot commented 5 hours ago

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK