]> git.lizzy.rs Git - rust.git/commit
Auto merge of #37290 - petrochenkov:pnp, r=jseyfried
authorbors <bors@rust-lang.org>
Fri, 21 Oct 2016 13:41:45 +0000 (06:41 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Oct 2016 13:41:45 +0000 (06:41 -0700)
commit5509ae399e4ed6f041b95bf948751f35b7d65517
treed692c77f98f64a456c1abe7d316d10e3d5788278
parentda5b6467c33f7f86b4964b08b37726f7611a8f0c
parentfea630ef9d738aabaf6cbf3ccedb1bc1adae1e6d
Auto merge of #37290 - petrochenkov:pnp, r=jseyfried

syntax: Tweak path parsing logic

Associated paths starting with `<<` are parsed in patterns.

Paths like `self::foo::bar` are interpreted as paths and not as `self` arguments in methods (cc @matklad).
Now, I believe, *all* paths are consistently parsed greedily in case of ambiguity.
Detection of `&'a mut self::` requires pretty large (but still fixed) lookahead, so I had to increase the size of parser's lookahead buffer.
Curiously, if `lookahead_distance >= lookahead_buffer_size` was used previously, the parser hung forever, I fixed this as well, now it ICEs.

r? @jseyfried