From: Pierre-Emmanuel Patry Date: Thu, 26 Oct 2023 13:48:52 +0000 (+0200) Subject: gccrs: Add a new test for const without body X-Git-Tag: basepoints/gcc-15~2015 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59bd1fc1a4453792aec4314df03b16d784bfcfbd;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/rust/compile/issue-2709.rs b/gcc/testsuite/rust/compile/issue-2709.rs new file mode 100644 index 000000000000..42fe7af230d9 --- /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 } +}