Fix syntax error in Rust test
authorTom Tromey <tom@tromey.com>
Fri, 16 Apr 2021 22:34:07 +0000 (16:34 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 16 Apr 2021 22:34:07 +0000 (16:34 -0600)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.exp

index 212f2ae0c5bec67d29049aa27f926c6158fa53b5..d659ec4ed1a99c00d185e44b93a0373448cdeb4e 100644 (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.
index 1e5994628c20f964c2e7a6ab58a2b4524d94c74c..6d5cd319f41056391df7b0d56d6dd35fb1355b6a 100644 (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\\\] \\{"
This page took 0.049607 seconds and 4 git commands to generate.