@@ -1199,7 +1199,7 @@ mod tests {
1199
1199
}
1200
1200
1201
1201
#[ test]
1202
- #[ cfg( all( feature = "unstable-locales" , target_pointer_width = "64" ) ) ]
1202
+ #[ cfg( all( feature = "unstable-locales" , feature = "alloc" , target_pointer_width = "64" ) ) ]
1203
1203
fn test_type_sizes ( ) {
1204
1204
use core:: mem:: size_of;
1205
1205
assert_eq ! ( size_of:: <Item >( ) , 32 ) ;
@@ -1208,14 +1208,32 @@ mod tests {
1208
1208
}
1209
1209
1210
1210
#[ test]
1211
- #[ cfg( all( feature = "unstable-locales" , target_pointer_width = "32" ) ) ]
1211
+ #[ cfg( all( feature = "unstable-locales" , not( feature = "alloc" ) , target_pointer_width = "64" ) ) ]
1212
+ fn test_type_sizes ( ) {
1213
+ use core:: mem:: size_of;
1214
+ assert_eq ! ( size_of:: <Item >( ) , 24 ) ;
1215
+ assert_eq ! ( size_of:: <StrftimeItems >( ) , 56 ) ;
1216
+ assert_eq ! ( size_of:: <Locale >( ) , 2 ) ;
1217
+ }
1218
+
1219
+ #[ test]
1220
+ #[ cfg( all( feature = "unstable-locales" , feature = "alloc" , target_pointer_width = "32" ) ) ]
1212
1221
fn test_type_sizes ( ) {
1213
1222
use core:: mem:: size_of;
1214
1223
assert_eq ! ( size_of:: <Item >( ) , 16 ) ;
1215
1224
assert_eq ! ( size_of:: <StrftimeItems >( ) , 28 ) ;
1216
1225
assert_eq ! ( size_of:: <Locale >( ) , 2 ) ;
1217
1226
}
1218
1227
1228
+ #[ test]
1229
+ #[ cfg( all( feature = "unstable-locales" , not( feature = "alloc" ) , target_pointer_width = "32" ) ) ]
1230
+ fn test_type_sizes ( ) {
1231
+ use core:: mem:: size_of;
1232
+ assert_eq ! ( size_of:: <Item >( ) , 12 ) ;
1233
+ assert_eq ! ( size_of:: <StrftimeItems >( ) , 28 ) ;
1234
+ assert_eq ! ( size_of:: <Locale >( ) , 2 ) ;
1235
+ }
1236
+
1219
1237
#[ test]
1220
1238
#[ cfg( any( feature = "alloc" , feature = "std" ) ) ]
1221
1239
fn test_strftime_parse ( ) {
0 commit comments