public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix syntax error in Rust test
@ 2021-04-16 23:12 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2021-04-16 23:12 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=458620aabb33d9b0efa61d0fb402c8d19e65eabd

commit 458620aabb33d9b0efa61d0fb402c8d19e65eabd
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Apr 16 16:34:07 2021 -0600

    Fix syntax error in Rust test
    
    The Rust test case simple.exp does:
    
        print slice as &[i32][0]
    
    However, this is a syntax error in Rust.  Parens are needed around the
    "as".
    
    gdb/testsuite/ChangeLog
    2021-04-16  Tom Tromey  <tom@tromey.com>
    
            * gdb.rust/simple.exp: Add parens to 'as' test.

Diff:
---
 gdb/testsuite/ChangeLog           | 4 ++++
 gdb/testsuite/gdb.rust/simple.exp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 212f2ae0c5b..d659ec4ed1a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-16  Tom Tromey  <tom@tromey.com>
+
+	* gdb.rust/simple.exp: Add parens to 'as' test.
+
 2021-04-16  Simon Marchi  <simon.marchi@efficios.com>
 
 	* boards/simavr.exp: Set debug_flags.
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 1e5994628c2..6d5cd319f41 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -88,7 +88,7 @@ gdb_test "print w\[2\] @ 2" " = \\\[3, 4\\\]"
 gdb_test "print w_ptr\[2\]" " = 3"
 gdb_test "print fromslice" " = 3"
 gdb_test "print slice\[0\]" " = 3"
-gdb_test "print slice as &\[i32\]\[0\]" " = 3"
+gdb_test "print (slice as &\[i32\])\[0\]" " = 3"
 
 gdb_test_sequence "ptype slice" "" {
     " = struct &\\\[i32\\\] \\{"


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

only message in thread, other threads:[~2021-04-16 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 23:12 [binutils-gdb] Fix syntax error in Rust test Tom Tromey

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).