Skip to content

Commit 3e6da98

Browse files
committed
---
yaml --- r: 13522 b: refs/heads/master c: 999ab54 h: refs/heads/master v: v3
1 parent 908beaf commit 3e6da98

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 210db7d8d4d0b65a2ae2b113ef50740c20cbd910
2+
refs/heads/master: 999ab5418a769cfcbde7c7291785bb98c5fd2a5f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rt/rust_shape.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,9 @@ class data : public ctxt< data<T,U> > {
923923
void walk_fixedvec1(uint16_t n_elts, bool is_pod) {
924924
size_align sa = size_of::get(*this);
925925
ALIGN_TO(sa.alignment);
926+
U next_dp = dp + (n_elts * sa.size);
926927
static_cast<T *>(this)->walk_fixedvec2(n_elts, sa.size, is_pod);
928+
dp = next_dp;
927929
}
928930

929931
void walk_box1() { DATA_SIMPLE(void *, walk_box2()); }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fn main() {
2+
let arr = [1,2,3]/3;
3+
let struct = {a: 13u8, b: arr, c: 42};
4+
let s = sys::log_str(struct);
5+
assert(s == "(13, [1, 2, 3]/3, 42)");
6+
}

0 commit comments

Comments
 (0)