File tree Expand file tree Collapse file tree 7 files changed +13
-6
lines changed Expand file tree Collapse file tree 7 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: ac311ecaab5d5a92fa86e9b201971bf92bcfbf99
8
+ refs/heads/try2: c8c08763ec12b0e693f400390957249c1f6583b9
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ mod test {
139
139
140
140
use enum_set:: * ;
141
141
142
- #[ deriving( Eq ) ]
142
+ #[ deriving( Eq ) ] # [ repr ( uint ) ]
143
143
enum Foo {
144
144
A , B , C
145
145
}
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ pub static Vector: TypeKind = 13;
147
147
pub static Metadata : TypeKind = 14 ;
148
148
pub static X86_MMX : TypeKind = 15 ;
149
149
150
+ #[ repr( C ) ]
150
151
pub enum AtomicBinOp {
151
152
Xchg = 0 ,
152
153
Add = 1 ,
@@ -161,6 +162,7 @@ pub enum AtomicBinOp {
161
162
UMin = 10 ,
162
163
}
163
164
165
+ #[ repr( C ) ]
164
166
pub enum AtomicOrdering {
165
167
NotAtomic = 0 ,
166
168
Unordered = 1 ,
@@ -173,6 +175,7 @@ pub enum AtomicOrdering {
173
175
}
174
176
175
177
// Consts for the LLVMCodeGenFileType type (in include/llvm/c/TargetMachine.h)
178
+ #[ repr( C ) ]
176
179
pub enum FileType {
177
180
AssemblyFile = 0 ,
178
181
ObjectFile = 1
@@ -194,20 +197,23 @@ pub enum AsmDialect {
194
197
}
195
198
196
199
#[ deriving( Eq ) ]
200
+ #[ repr( C ) ]
197
201
pub enum CodeGenOptLevel {
198
202
CodeGenLevelNone = 0 ,
199
203
CodeGenLevelLess = 1 ,
200
204
CodeGenLevelDefault = 2 ,
201
205
CodeGenLevelAggressive = 3 ,
202
206
}
203
207
208
+ #[ repr( C ) ]
204
209
pub enum RelocMode {
205
210
RelocDefault = 0 ,
206
211
RelocStatic = 1 ,
207
212
RelocPIC = 2 ,
208
213
RelocDynamicNoPic = 3 ,
209
214
}
210
215
216
+ #[ repr( C ) ]
211
217
pub enum CodeGenModel {
212
218
CodeModelDefault = 0 ,
213
219
CodeModelJITDefault = 1 ,
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ pub static tag_items_data_item_reexport_def_id: uint = 0x4e;
111
111
pub static tag_items_data_item_reexport_name: uint = 0x4f ;
112
112
113
113
// used to encode crate_ctxt side tables
114
- #[ deriving( Eq ) ]
114
+ #[ deriving( Eq ) ] # [ repr ( uint ) ]
115
115
pub enum astencode_tag { // Reserves 0x50 -- 0x6f
116
116
tag_ast = 0x50 ,
117
117
@@ -143,7 +143,7 @@ impl astencode_tag {
143
143
pub fn from_uint ( value : uint ) -> Option < astencode_tag > {
144
144
let is_a_tag = first_astencode_tag <= value && value <= last_astencode_tag;
145
145
if !is_a_tag { None } else {
146
- Some ( unsafe { cast:: transmute ( value as int ) } )
146
+ Some ( unsafe { cast:: transmute ( value) } )
147
147
}
148
148
}
149
149
}
Original file line number Diff line number Diff line change @@ -715,7 +715,7 @@ pub struct ParamBounds {
715
715
716
716
pub type BuiltinBounds = EnumSet < BuiltinBound > ;
717
717
718
- #[ deriving( Clone , Eq , IterBytes , ToStr ) ]
718
+ #[ deriving( Clone , Eq , IterBytes , ToStr ) ] # [ repr ( uint ) ]
719
719
pub enum BuiltinBound {
720
720
BoundStatic ,
721
721
BoundSend ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ use result::{Err, Ok};
26
26
use rt:: io:: io_error;
27
27
use rt:: rtio:: { IoFactory , RtioSignal , with_local_io} ;
28
28
29
+ #[ repr( int) ]
29
30
#[ deriving( Eq , IterBytes ) ]
30
31
pub enum Signum {
31
32
/// Equivalent to SIGBREAK, delivered when the user presses Ctrl-Break.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ pub mod pipes {
26
26
payload : Option < T >
27
27
}
28
28
29
- #[ deriving( Eq ) ]
29
+ #[ deriving( Eq ) ] # [ repr ( int ) ]
30
30
pub enum state {
31
31
empty,
32
32
full,
You can’t perform that action at this time.
0 commit comments