public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Arthur Cohen <cohenarthur@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-7929] gccrs: Add a regression test for decimal lexing
Date: Tue, 16 Jan 2024 18:08:11 +0000 (GMT)	[thread overview]
Message-ID: <20240116180811.B9E1E385800B@sourceware.org> (raw)

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();
+}

                 reply	other threads:[~2024-01-16 18:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240116180811.B9E1E385800B@sourceware.org \
    --to=cohenarthur@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).