aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r--gdb/rust-lang.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 36f7790..a48996e 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -989,9 +989,8 @@ rust_composite_type (struct type *original,
}
if (i > 0)
- TYPE_LENGTH (result)
- = (result->field (i - 1).loc_bitpos () / TARGET_CHAR_BIT +
- TYPE_LENGTH (result->field (i - 1).type ()));
+ result->set_length (result->field (i - 1).loc_bitpos () / TARGET_CHAR_BIT
+ + TYPE_LENGTH (result->field (i - 1).type ()));
return result;
}