Handle sizeof(type) in Rust
PR rust/21764 notes that "sizeof" does not work correctly for all types
in Rust. The bug turns out to be an error in the conversion of the AST
to gdb expressions. This patch fixes the bug and also avoids generating
incorrect expressions in another case.
Tested on the buildbot. I'm checking this in.
2017-07-14 Tom Tromey <tom@tromey.com>
PR rust/21764:
* rust-exp.y (convert_ast_to_expression): Add "want_type"
parameter.
<UNOP_SIZEOF>: Split into separate case.
<UNOP_VAR_VALUE>: Handle want_type. Add error case.
2017-07-14 Tom Tromey <tom@tromey.com>
PR rust/21764:
* gdb.rust/simple.exp: Add tests.