diff options
Diffstat (limited to 'gdb/rust-parse.c')
-rw-r--r-- | gdb/rust-parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c index 6c7922d..648e48d 100644 --- a/gdb/rust-parse.c +++ b/gdb/rust-parse.c @@ -1190,7 +1190,7 @@ rust_parser::parse_array () result = make_operation<rust_array_operation> (std::move (expr), std::move (rhs)); } - else if (current_token == ',') + else if (current_token == ',' || current_token == ']') { std::vector<operation_up> ops; ops.push_back (std::move (expr)); @@ -1205,7 +1205,7 @@ rust_parser::parse_array () int len = ops.size () - 1; result = make_operation<array_operation> (0, len, std::move (ops)); } - else if (current_token != ']') + else error (_("',', ';', or ']' expected")); require (']'); |