From fd7d577a3e1f249e35e66b7d19e5bfbf502c0a82 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 31 Oct 2023 15:43:51 +0100 Subject: [PATCH] Add a new test for float disambiguation This new regression test highlight the behavior fixed for float disambiguation with empty floating point. gcc/testsuite/ChangeLog: * rust/compile/tuple_float_index.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/tuple_float_index.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gcc/testsuite/rust/compile/tuple_float_index.rs diff --git a/gcc/testsuite/rust/compile/tuple_float_index.rs b/gcc/testsuite/rust/compile/tuple_float_index.rs new file mode 100644 index 000000000000..87410c5708d7 --- /dev/null +++ b/gcc/testsuite/rust/compile/tuple_float_index.rs @@ -0,0 +1,6 @@ +fn main() { + let tuple = (((),()),); + + // Do not reformat, the space after the second dot is required + let _ = tuple.0. 1; +}