diff options
author | Tom Tromey <tom@tromey.com> | 2021-04-16 16:34:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-04-16 16:34:07 -0600 |
commit | 458620aabb33d9b0efa61d0fb402c8d19e65eabd (patch) | |
tree | 6288adecad68c720deee525861c6eea24eed9fec | |
parent | 321d0cd7e78d6133cb0c607526c1f1fb380424ae (diff) | |
download | gdb-458620aabb33d9b0efa61d0fb402c8d19e65eabd.zip gdb-458620aabb33d9b0efa61d0fb402c8d19e65eabd.tar.gz gdb-458620aabb33d9b0efa61d0fb402c8d19e65eabd.tar.bz2 |
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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.exp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 212f2ae..d659ec4 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 1e59946..6d5cd31 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\\\] \\{" |