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

https://gcc.gnu.org/g:6899eaa70f4fb95ef5b07ae5c073189593f0aa2a

commit r14-7929-g6899eaa70f4fb95ef5b07ae5c073189593f0aa2a
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Thu Aug 3 15:52:51 2023 +0200

    gccrs: Add a regression test for decimal lexing
    
    Issue #2514 fixed by the previous commit highlight a behavior we want to
    avoid in the future, hence this regression test.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/issue-2514.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/testsuite/rust/compile/issue-2514.rs | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gcc/testsuite/rust/compile/issue-2514.rs b/gcc/testsuite/rust/compile/issue-2514.rs
new file mode 100644
index 00000000000..05e106c96c9
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2514.rs
@@ -0,0 +1,14 @@
+struct First {
+    i: usize,
+}
+
+impl First {
+    pub fn e_function(mut self) {
+        self.i += 1;
+    }
+}
+
+pub fn main() {
+    let a = (First { i: 10 }, 2);
+    a.0.e_function();
+}

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

only message in thread, other threads:[~2024-01-16 18:08 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:08 [gcc r14-7929] gccrs: Add a regression test for decimal lexing 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).