From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7905) id 6B8A2385C413; Tue, 16 Jan 2024 18:15:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B8A2385C413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705428940; bh=QHUBsnHULvTMFWChrYX31HOhghr1qlqQmG70nEWed9Y=; h=From:To:Subject:Date:From; b=vNK7uPtW9NoJTv6yJX+CyX7UY/0lkaGbDOALKVLyiFCly6T1KXqVAlFgjvP0eB4XZ qFIqMcfY/yZ5CvsGzVTH2GH4tVy97soYET+vRe3L+jeT3iDzM/aVAUQSaHUnBzNroC g/czmhG8j4+T6WoDQhIcoPI7Zo365KFJmP4iVnXI= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Arthur Cohen To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8124] gccrs: Add a new test for const without body X-Act-Checkin: gcc X-Git-Author: Pierre-Emmanuel Patry X-Git-Refname: refs/heads/trunk X-Git-Oldrev: 222f27d3ac159f1c56b670f336fb515e84491df4 X-Git-Newrev: 59bd1fc1a4453792aec4314df03b16d784bfcfbd Message-Id: <20240116181540.6B8A2385C413@sourceware.org> Date: Tue, 16 Jan 2024 18:15:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:59bd1fc1a4453792aec4314df03b16d784bfcfbd commit r14-8124-g59bd1fc1a4453792aec4314df03b16d784bfcfbd Author: Pierre-Emmanuel Patry Date: Thu Oct 26 15:48:52 2023 +0200 gccrs: Add a new test for const without body This new regression test highlight the fixed behavior for 2709. gcc/testsuite/ChangeLog: * rust/compile/issue-2709.rs: New test. Signed-off-by: Pierre-Emmanuel Patry Diff: --- gcc/testsuite/rust/compile/issue-2709.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/testsuite/rust/compile/issue-2709.rs b/gcc/testsuite/rust/compile/issue-2709.rs new file mode 100644 index 00000000000..42fe7af230d --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-2709.rs @@ -0,0 +1,8 @@ +fn main() {} + +struct S; + +impl S { + const Y: u8; + // { dg-error "associated constant in .impl. without body" "" { target *-*-* } .-1 } +}