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

Implement conversion traits between arrays and uniform tuples. #33788

Closed

Conversation

SimonSapin
Copy link
Contributor

AsRef, AsMut, and Into in both direction between [T; N] and (T, T, …), for N from 0 to 32.

AsRef, AsMut, and Into in both direction between [T; N] and (T, T, …),
for N from 0 to 32.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@SimonSapin
Copy link
Contributor Author

I don’t have a strong motivation for this, it just seemed neat. Arrays and uniform tuples are interchangeable to some extent, and I believe their memory representation is the same. (Is that guaranteed to always be the case?)

@alexcrichton
Copy link
Member

This was previously proposed in #30736, to which the libs team concluded that the full generalization is very var out, so if there's not a strong motivation to have this in the meantime we'd prefer to not land.

@petrochenkov
Copy link
Contributor

cc rust-lang/rfcs#1397

@SimonSapin
Copy link
Contributor Author

Fair enough.

@SimonSapin SimonSapin closed this May 22, 2016
@SimonSapin SimonSapin deleted the array-tuple-conversions branch May 22, 2016 19:55
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

Successfully merging this pull request may close these issues.

5 participants