Remove cleanups from Rust parser
This removes the few remaining cleanups in the Rust language code.
The main difficulty here was that the earlier code allocated VEC heads
on an obstack. The new code instead introduces an object that
allocates and maintains the storage for whatever vectors are needed
during the parse.
Regression tested on the buildbot.
ChangeLog
2017-08-05 Tom Tromey <tom@tromey.com>
* rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
(rust_op_vector, rust_set_vector): New typedefs.
(current_parser): New global.
(work_obstack): Change to pointer type. Update all users.
(rust_ast, pstate): Remove globals.
(struct rust_parser): New.
(%union) <params, field_inits>: Change type.
(start, tuple_expr, unit_expr, struct_expr_list, literal)
(field_expr, expr_list, maybe_expr_list, type_list): Update.
(ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
(convert_params_to_types, convert_params_to_expression): Change
type of "params".
(ast_string): Change type of "fields".
(rust_parse): Make a rust_parser. Remove cleanups.
(rust_lex_tests): Make and install an auto_obstack.