diff options
author | Lyra <teromene@teromene.fr> | 2021-05-05 19:47:27 +0200 |
---|---|---|
committer | Lyra <teromene@teromene.fr> | 2021-05-05 19:47:27 +0200 |
commit | 09ec48621f7ae2cf4665942e95166fd3f840fb2b (patch) | |
tree | 43c848ee7d2db2a30810adcdc613329d992f30a7 | |
parent | e355d22a21afc2dbfc339f20a4c6ae3cb4e41c93 (diff) | |
download | gcc-09ec48621f7ae2cf4665942e95166fd3f840fb2b.zip gcc-09ec48621f7ae2cf4665942e95166fd3f840fb2b.tar.gz gcc-09ec48621f7ae2cf4665942e95166fd3f840fb2b.tar.bz2 |
Fix clang formatting and include a test
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/rust.test/xfail_compile/issue-407.rs | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 06f8ef7..5dcb458 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -11457,7 +11457,7 @@ Parser<ManagedTokenSource>::parse_stmt_or_expr_with_block ( { auto expr = parse_expr_with_block (std::move (outer_attrs)); if (expr == nullptr) - return ExprOrStmt::create_error(); + return ExprOrStmt::create_error (); auto tok = lexer.peek_token (); diff --git a/gcc/testsuite/rust.test/xfail_compile/issue-407.rs b/gcc/testsuite/rust.test/xfail_compile/issue-407.rs new file mode 100644 index 0000000..49ce91b --- /dev/null +++ b/gcc/testsuite/rust.test/xfail_compile/issue-407.rs @@ -0,0 +1,5 @@ +// { dg-excess-errors "failed to parse" } +fn test() { + let mut a = 1; + a + = 1; // { dg-error "found unexpected token ‘=’ in null denotation" +} |