diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-14 22:22:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-14 22:22:15 +0000 |
commit | 52c1cdc9c63baeb090680daf6762c02362f2c6cd (patch) | |
tree | 8be58e078de992e2b2743557d747521b27b173ae /gcc/rust/backend/rust-compile-resolve-path.cc | |
parent | e53f1acb282a226cd037fd21e587c83f09c2e4af (diff) | |
parent | ee3d0b09dc7777cd04587a83f5cfe785101f0dc9 (diff) | |
download | gcc-52c1cdc9c63baeb090680daf6762c02362f2c6cd.zip gcc-52c1cdc9c63baeb090680daf6762c02362f2c6cd.tar.gz gcc-52c1cdc9c63baeb090680daf6762c02362f2c6cd.tar.bz2 |
Merge #630
630: parse if expression with unary minus or not expression r=philberty a=dkm
From Mark Wielaard : https://gcc.gnu.org/pipermail/gcc-rust/2021-August/000140.html
> An if conditional expression doesn't need brackets, but that means
> that it doesn't accept struct expressions. Those are not easy to
> distinquish from the block that follows. What isn't immediately clear
> from the grammar is that unary conditions like minus '-' or not '!'
> also shouldn't accept struct expressions (when part of an if
> conditional expression) because those also cannot be easily
> distinquished from the block that follows.
>
> Add a testcase "ifunaryexpr.rs" that shows a couple of contructs that
> should be accepted as if conditional expressions and fix the parser to
> pass the restriction of not accepting struct expressions after a unary
> expression.
Co-authored-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions