From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 1/2] Fix syntax error in Rust test
Date: Thu, 11 Mar 2021 19:46:37 -0700 [thread overview]
Message-ID: <20210312024638.176051-2-tom@tromey.com> (raw)
In-Reply-To: <20210312024638.176051-1-tom@tromey.com>
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-03-11 Tom Tromey <tom@tromey.com>
* gdb.rust/simple.exp: Add parens to 'as' test.
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.rust/simple.exp | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
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\\\] \\{"
--
2.26.2
next prev parent reply other threads:[~2021-03-12 2:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 2:46 [PATCH 0/2] Rewrite the Rust expression parser Tom Tromey
2021-03-12 2:46 ` Tom Tromey [this message]
2021-03-12 2:46 ` [PATCH 2/2] " Tom Tromey
2021-04-16 23:12 ` [PATCH 0/2] " Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210312024638.176051-2-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).