Skip to content

Commit 48647d3

Browse files
committed
---
yaml --- r: 82313 b: refs/heads/master c: 4b4b213 h: refs/heads/master i: 82311: db1b4b6 v: v3
1 parent f5df2e7 commit 48647d3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
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: c6e3501da14784cd2401dded3b53f3ce3405b4ec
2+
refs/heads/master: 4b4b2136e048c39c60c8289f4cd1c870d4aaaeb0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/src/librustc/middle/trans/adt.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,12 @@ pub fn trans_const(ccx: &mut CrateContext, r: &Repr, discr: Disr,
505505
}
506506
Univariant(ref st, _dro) => {
507507
assert_eq!(discr, 0);
508-
C_struct(build_const_struct(ccx, st, vals))
508+
let contents = build_const_struct(ccx, st, vals);
509+
if st.packed {
510+
C_packed_struct(contents)
511+
} else {
512+
C_struct(contents)
513+
}
509514
}
510515
General(ref cases) => {
511516
let case = &cases[discr];

0 commit comments

Comments
 (0)