Skip to content

Docs do not mention that tuple destructing can use the "and the rest" operator #74830

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
That3Percent opened this issue Jul 27, 2020 · 2 comments

Comments

@That3Percent
Copy link

I think it would be useful if on this page: Destructuring Tuple it mentioned the "and the rest" operator.

For example: let (a, b, ..) = (0, 1, 2, 3, 4); is possible, but the only case I could find something like that was in Appendix B - Operators and Symbols

@LeSeulArtichaut
Copy link
Contributor

This should be reported in the rust-lang/rust-by-example repository. Maybe someone (@steveklabnik?) can move this issue?

@That3Percent
Copy link
Author

Sorry, my bad. I've opened the issue in rust-by-example here. Closing this as duplicate.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants