@@ -1067,8 +1067,8 @@ impl<'a> MethodDef<'a> {
1067
1067
. collect :: < Vec < ast:: Ident > > ( ) ;
1068
1068
1069
1069
// The `vi_idents` will be bound, solely in the catch-all, to
1070
- // a series of let statements mapping each self_arg to an isize
1071
- // corresponding to its discriminant value .
1070
+ // a series of let statements mapping each self_arg to an int
1071
+ // value corresponding to its discriminant.
1072
1072
let vi_idents: Vec < ast:: Ident > = self_arg_names. iter ( )
1073
1073
. map ( |name| { let vi_suffix = format ! ( "{}_vi" , & name[ ..] ) ;
1074
1074
cx. ident_of ( & vi_suffix[ ..] ) } )
@@ -1186,18 +1186,19 @@ impl<'a> MethodDef<'a> {
1186
1186
// Build a series of let statements mapping each self_arg
1187
1187
// to its discriminant value. If this is a C-style enum
1188
1188
// with a specific repr type, then casts the values to
1189
- // that type. Otherwise casts to `isize`.
1189
+ // that type. Otherwise casts to `i32` (the default repr
1190
+ // type).
1190
1191
//
1191
1192
// i.e. for `enum E<T> { A, B(1), C(T, T) }`, and a deriving
1192
1193
// with three Self args, builds three statements:
1193
1194
//
1194
1195
// ```
1195
1196
// let __self0_vi = unsafe {
1196
- // std::intrinsics::discriminant_value(&self) } as isize ;
1197
+ // std::intrinsics::discriminant_value(&self) } as i32 ;
1197
1198
// let __self1_vi = unsafe {
1198
- // std::intrinsics::discriminant_value(&__arg1) } as isize ;
1199
+ // std::intrinsics::discriminant_value(&__arg1) } as i32 ;
1199
1200
// let __self2_vi = unsafe {
1200
- // std::intrinsics::discriminant_value(&__arg2) } as isize ;
1201
+ // std::intrinsics::discriminant_value(&__arg2) } as i32 ;
1201
1202
// ```
1202
1203
let mut index_let_stmts: Vec < P < ast:: Stmt > > = Vec :: new ( ) ;
1203
1204
0 commit comments