mozilla/rust — pull request #4091 by fawek (2012-12-01 22:26:17+00:00)
Title: Vector destructuring

This is an initial implementation of vector destructuring as in #1844. It's not quite there yet but I'd like to gather feedback, assuming there is still interest in this being part of the language. I've added some tests, two of which are failing at the moment as there's no pattern reachability and exhaustiveness detection just yet.

As mentioned in the bug, there already is a list structure in libstd, which can already be easily destructured and matched against. It's not a first-class citizen in Rust, so it may be worth making it easy for vectors as well.