rust-lang/rust — pull request #18171 by jakub- (2014-10-20 00:05:47+00:00)
Title: Overhaul typechecking of patterns

Rather than doing it top-down, with a known expected type, we will now simply establish the appropriate constraints between the pattern and the expression it destructures.

This also adds mutability to region patterns (&mut pat) and requires it to match the mutability of the type being matched against. This will need an RFC first, obviously.

I haven't updated the tests yet as I'd like to hear what people think.

cc @nikomatsakis