summaryrefslogtreecommitdiff
path: root/gdb/rust-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rust-exp.y')
-rw-r--r--gdb/rust-exp.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
index 6e3e49259d0..47aa799754d 100644
--- a/gdb/rust-exp.y
+++ b/gdb/rust-exp.y
@@ -2414,7 +2414,7 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation,
if (!want_type
&& type->code () == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 0)
+ && type->num_fields () == 0)
{
/* A unit-like struct. */
write_exp_elt_opcode (pstate, OP_AGGREGATE);