Skip to content

Commit f4bd6d9

Browse files
committed
---
yaml --- r: 146299 b: refs/heads/try2 c: c8c0876 h: refs/heads/master i: 146297: 110b70a 146295: 285ec2f v: v3
1 parent b8ff53f commit f4bd6d9

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ac311ecaab5d5a92fa86e9b201971bf92bcfbf99
8+
refs/heads/try2: c8c08763ec12b0e693f400390957249c1f6583b9
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ mod test {
139139

140140
use enum_set::*;
141141

142-
#[deriving(Eq)]
142+
#[deriving(Eq)] #[repr(uint)]
143143
enum Foo {
144144
A, B, C
145145
}

branches/try2/src/librustc/lib/llvm.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ pub static Vector: TypeKind = 13;
147147
pub static Metadata: TypeKind = 14;
148148
pub static X86_MMX: TypeKind = 15;
149149

150+
#[repr(C)]
150151
pub enum AtomicBinOp {
151152
Xchg = 0,
152153
Add = 1,
@@ -161,6 +162,7 @@ pub enum AtomicBinOp {
161162
UMin = 10,
162163
}
163164

165+
#[repr(C)]
164166
pub enum AtomicOrdering {
165167
NotAtomic = 0,
166168
Unordered = 1,
@@ -173,6 +175,7 @@ pub enum AtomicOrdering {
173175
}
174176

175177
// Consts for the LLVMCodeGenFileType type (in include/llvm/c/TargetMachine.h)
178+
#[repr(C)]
176179
pub enum FileType {
177180
AssemblyFile = 0,
178181
ObjectFile = 1
@@ -194,20 +197,23 @@ pub enum AsmDialect {
194197
}
195198

196199
#[deriving(Eq)]
200+
#[repr(C)]
197201
pub enum CodeGenOptLevel {
198202
CodeGenLevelNone = 0,
199203
CodeGenLevelLess = 1,
200204
CodeGenLevelDefault = 2,
201205
CodeGenLevelAggressive = 3,
202206
}
203207

208+
#[repr(C)]
204209
pub enum RelocMode {
205210
RelocDefault = 0,
206211
RelocStatic = 1,
207212
RelocPIC = 2,
208213
RelocDynamicNoPic = 3,
209214
}
210215

216+
#[repr(C)]
211217
pub enum CodeGenModel {
212218
CodeModelDefault = 0,
213219
CodeModelJITDefault = 1,

branches/try2/src/librustc/metadata/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub static tag_items_data_item_reexport_def_id: uint = 0x4e;
111111
pub static tag_items_data_item_reexport_name: uint = 0x4f;
112112

113113
// used to encode crate_ctxt side tables
114-
#[deriving(Eq)]
114+
#[deriving(Eq)] #[repr(uint)]
115115
pub enum astencode_tag { // Reserves 0x50 -- 0x6f
116116
tag_ast = 0x50,
117117

@@ -143,7 +143,7 @@ impl astencode_tag {
143143
pub fn from_uint(value : uint) -> Option<astencode_tag> {
144144
let is_a_tag = first_astencode_tag <= value && value <= last_astencode_tag;
145145
if !is_a_tag { None } else {
146-
Some(unsafe { cast::transmute(value as int) })
146+
Some(unsafe { cast::transmute(value) })
147147
}
148148
}
149149
}

branches/try2/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ pub struct ParamBounds {
715715

716716
pub type BuiltinBounds = EnumSet<BuiltinBound>;
717717

718-
#[deriving(Clone, Eq, IterBytes, ToStr)]
718+
#[deriving(Clone, Eq, IterBytes, ToStr)] #[repr(uint)]
719719
pub enum BuiltinBound {
720720
BoundStatic,
721721
BoundSend,

branches/try2/src/libstd/rt/io/signal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use result::{Err, Ok};
2626
use rt::io::io_error;
2727
use rt::rtio::{IoFactory, RtioSignal, with_local_io};
2828

29+
#[repr(int)]
2930
#[deriving(Eq, IterBytes)]
3031
pub enum Signum {
3132
/// Equivalent to SIGBREAK, delivered when the user presses Ctrl-Break.

branches/try2/src/test/run-pass/issue-2718.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub mod pipes {
2626
payload: Option<T>
2727
}
2828

29-
#[deriving(Eq)]
29+
#[deriving(Eq)] #[repr(int)]
3030
pub enum state {
3131
empty,
3232
full,

0 commit comments

Comments
 (0)