aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-03 15:52:51 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-08-17 10:01:43 +0000
commit9ef8689c7faeec4f6833bff39aa2301f14209c9a (patch)
treee43846d55dce6f5ad36f7d358061404abae40f8a
parentc5326821d396599a12b3f1293229e943a95f29be (diff)
downloadgcc-9ef8689c7faeec4f6833bff39aa2301f14209c9a.zip
gcc-9ef8689c7faeec4f6833bff39aa2301f14209c9a.tar.gz
gcc-9ef8689c7faeec4f6833bff39aa2301f14209c9a.tar.bz2
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>
-rw-r--r--gcc/testsuite/rust/compile/issue-2514.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-2514.rs b/gcc/testsuite/rust/compile/issue-2514.rs
new file mode 100644
index 0000000..05e106c
--- /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();
+}