]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 19 Jan 2015 19:40:51 +0000 (19:40 +0000)
committerbors <bors@rust-lang.org>
Mon, 19 Jan 2015 19:40:51 +0000 (19:40 +0000)
Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.

1  2 
src/libsyntax/parse/parser.rs

Simple merge