Skip to content

Commit 5530c1c

Browse files
committed
---
yaml --- r: 42367 b: refs/heads/master c: 52cf61f h: refs/heads/master i: 42365: ddf64a4 42363: 75f82f0 42359: 41d59a8 42351: ca6c907 42335: 8173a8e 42303: 1bd9792 42239: 3a72b48 v: v3
1 parent 3aa4166 commit 5530c1c

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
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: d903231f1e7d7efb35405bdfdcbc451385e429b2
2+
refs/heads/master: 52cf61fd3bf928de5ca56957e5e1a2dc88d10848
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,12 @@ pub fn const_expr(cx: @crate_ctxt, e: @ast::expr) -> ValueRef {
470470

471471
// FIXME (#1645): enum body alignment is generaly wrong.
472472
if !degen {
473-
C_packed_struct(~[discrim, c_args])
473+
// A packed_struct has an alignment of 1; thus,
474+
// wrapping one around c_args will misalign it the
475+
// same way we normally misalign enum bodies
476+
// without affecting its internal alignment or
477+
// changing the alignment of the enum.
478+
C_struct(~[discrim, C_packed_struct(~[c_args])])
474479
} else if size == 0 {
475480
C_struct(~[discrim])
476481
} else {

trunk/src/libstd/priority_queue.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
use core::container::{Container, Mutable};
1414
use core::cmp::Ord;
15-
use core::iter::BaseIter;
1615
use core::prelude::*;
1716
use core::ptr::addr_of;
1817
use core::vec;
@@ -27,14 +26,6 @@ pub struct PriorityQueue<T> {
2726
priv data: ~[T],
2827
}
2928

30-
impl <T: Ord> PriorityQueue<T>: BaseIter<T> {
31-
/// Visit all values in the underlying vector.
32-
///
33-
/// The values are **not** visited in order.
34-
pure fn each(&self, f: fn(&T) -> bool) { self.data.each(f) }
35-
pure fn size_hint(&self) -> Option<uint> { self.data.size_hint() }
36-
}
37-
3829
impl <T: Ord> PriorityQueue<T>: Container {
3930
/// Returns the length of the queue
4031
pure fn len(&self) -> uint { self.data.len() }

0 commit comments

Comments
 (0)