From b50b73e3922081d4896cd10216c4c8f89388828f Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 27 Feb 2023 14:08:10 +0100 Subject: testsuite: Add test with missing semicolon Add a test to the testsuite in order to verify the presence of a semicolon at the end of an external type item declaration. gcc/testsuite/ChangeLog: * rust/compile/extern_type_item_missing_semi.rs: New failing test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs (limited to 'gcc') diff --git a/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs b/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs new file mode 100644 index 0000000..a42af02 --- /dev/null +++ b/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs @@ -0,0 +1,7 @@ +// { dg-additional-options "-fsyntax-only" } + +extern "C" { + type F; + type E // { dg-error "failed to parse" } +} // { dg-error "expecting" } +// { dg-error "failed to parse item in crate" "" { target *-*-* } .-1 } -- cgit v1.1