From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 719C6385840C; Tue, 28 Feb 2023 22:36:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 719C6385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677623814; bh=qnbFsc+ih8TwcGYz0et/D+HkpHG0PDkXAwWDd8VwP7c=; h=From:To:Subject:Date:From; b=t0I26kcSx3XBV3p8nJYnN3MpkiB3JFhj0MFKB3vV9sN5loA53VYUf1kL2T2UMR4ot pqCWCBgyzmUVT+rjRXDAEPw6TtYEUe4lDnPRL8oxlEjXvnp98jyfmpIVTJ8M+Nroqw EQef7sNiSvhkV7iVRvllpnY1OnPZOXge1sRL/z8U= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] testsuite: Add test with missing semicolon X-Act-Checkin: gcc X-Git-Author: Pierre-Emmanuel Patry X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: f2d18bdabc4efc0fc4d7ddf045fcebcf8407a3ba X-Git-Newrev: b50b73e3922081d4896cd10216c4c8f89388828f Message-Id: <20230228223654.719C6385840C@sourceware.org> Date: Tue, 28 Feb 2023 22:36:54 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b50b73e3922081d4896cd10216c4c8f89388828f commit b50b73e3922081d4896cd10216c4c8f89388828f Author: Pierre-Emmanuel Patry Date: Mon Feb 27 14:08:10 2023 +0100 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 Diff: --- gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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 00000000000..a42af02210f --- /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 }