diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-03-01 17:45:51 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-02 16:36:57 +0000 |
commit | 26b19976c898dd08f7234dc179ad57085f974b1a (patch) | |
tree | 461eef6201341e93d9d5c44ba4d4206216f79116 /gcc/rust/resolve | |
parent | 32a9736ef6ea85993a95cd038cf1712378172fb8 (diff) | |
download | gcc-26b19976c898dd08f7234dc179ad57085f974b1a.zip gcc-26b19976c898dd08f7234dc179ad57085f974b1a.tar.gz gcc-26b19976c898dd08f7234dc179ad57085f974b1a.tar.bz2 |
parser: Fix while let expr parsing
While let expr return unit but are valid construct in rust, they should
therefore be included in the parsing code. Also add a new test to check
parsing of while let expressions.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_while_let_loop_expr):
Prevent hard error on token skip.
(Parser::null_denotation): Fix parser for while let expressions.
gcc/testsuite/ChangeLog:
* rust/compile/while_let_expr.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions