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.
This commit is contained in:
Tom Tromey 2021-04-16 16:34:07 -06:00
parent 321d0cd7e7
commit 458620aabb
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -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\\\] \\{"