public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8124] gccrs: Add a new test for const without body
@ 2024-01-16 18:15 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:15 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:59bd1fc1a4453792aec4314df03b16d784bfcfbd

commit r14-8124-g59bd1fc1a4453792aec4314df03b16d784bfcfbd
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
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 <pierre-emmanuel.patry@embecosm.com>

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 }
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:15 [gcc r14-8124] gccrs: Add a new test for const without body Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).