-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Support richer tuple unpacking #3736
Comments
The first example should work, though it is indeed somewhat less efficient. The second does not work because what appears after let is a pattern, not just a list of lvalues. |
bors
added a commit
that referenced
this issue
Feb 3, 2019
submodule: update clippy from 6ce78d1 to 3bda548 rust-lang/rust-clippy@6ce78d1...3bda548 Rustup: unused trim result Auto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr … Travis: Don't run integration tests on every PR commit … Auto merge of #3726 - phansch:some_renaming, r=oli-obk … Fix ICE in vec_box lint and add run-rustfix … Make vec_box MachineApplicable Remove conditionals from base builds … Adding lint for too many lines. Updating number of lines for the failing test to be > 100. … Running util/dev to update README/CHANGELOG Reworking function logic, and adding doc example. … Moving tests to ui-toml to make use of clippy.toml rustfmt Adding back tests, but also reducing threshold by 1 Updating to just warn for one test. Fix test broken by removing comment. Skipping check if in external macro. Adding lint for too many lines. Updating number of lines for the failing test to be > 100. … Moving tests to ui-toml to make use of clippy.toml rustfmt Adding back tests, but also reducing threshold by 1 Updating to just warn for one test. Fix test broken by removing comment. Changing single character string to a character match. Updated readme. Updating code to ignore rustfmt issue. phansch and avborhanian Update clippy_lints/src/types.rs … Update clippy_lints/src/types.rs … Auto merge of #3732 - phansch:fix_ice_3720, r=oli-obk … Auto merge of #3731 - phansch:travis, r=phansch … Auto merge of #2857 - avborhanian:master, r=phansch … Fix breakage due to #58079 … Auto merge of #3736 - mikerite:fix-build-20190203, r=phansch … related with: #58024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure if it's less efficient to do:
Than:
But I find the former a lot easier to type in some cases. It'd be nice to know if destructuring of this kind is a valid use of tuple unpacking in Rust.
It'd also be nice if the following was legal:
Right now the above dies with the following error:
The text was updated successfully, but these errors were encountered: