]> git.lizzy.rs Git - rust.git/commit
Merge #1951
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Tue, 8 Oct 2019 08:44:26 +0000 (08:44 +0000)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2019 08:44:26 +0000 (08:44 +0000)
commitd9338dfa98964c0dac8fc082c3d9201807feced0
tree2e1f841be60665df9e5c61845fb49e93a6332c68
parent523d7d2c8210b382146c76927e93f1cc8a6d31e2
parentb4fe06bc17127b6007114a8ba8bf876fdef112e0
Merge #1951

1951: Lower the precedence of the `as` operator. r=matklad a=goffrie

Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.

Fixes #1851.

Co-authored-by: Geoffry Song <goffrie@gmail.com>
crates/ra_parser/src/grammar/expressions.rs