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

Use associated constants for ArrayLength? #54

Closed
matklad opened this issue Nov 30, 2017 · 2 comments
Closed

Use associated constants for ArrayLength? #54

matklad opened this issue Nov 30, 2017 · 2 comments

Comments

@matklad
Copy link

matklad commented Nov 30, 2017

Hi!

Rust recently gained an ability to specify associated constants in traits, and I wonder if we can use it to simplify GeneritArray. My current experiments are here: matklad@20be18b

Looks like it's not working at this time though :(

@burdges
Copy link

burdges commented Nov 30, 2017

Associated constants do not work in array lengths yet rust-lang/rust#44168 not even on nightly.

I'd think folks should remove the dependency on generic-array entirely once that bug gets fixed and all the bits get stabilized. I donno if there is any need to change this crate, merely phase it out eventually.

@matklad
Copy link
Author

matklad commented Nov 30, 2017

Yeah, I've played a bit more with it and I see now the limitations of associated constants, and it's reasonable to asume that, once they are fixed, we'll have proper const type parameters!

@matklad matklad closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants