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