File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,14 @@ use time::{
26
26
#[ test]
27
27
fn alignment ( ) {
28
28
macro_rules! assert_alignment {
29
- ( $t: ty, $alignment: literal) => {
29
+ ( $t: ty, $alignment: expr) => {
30
+ let alignment = $alignment;
30
31
assert_eq!(
31
32
:: core:: mem:: align_of:: <$t>( ) ,
32
- $ alignment,
33
- concat! ( "alignment of `{}` was " , $alignment ) ,
33
+ alignment,
34
+ "alignment of `{}` was {}" ,
34
35
stringify!( $t) ,
36
+ alignment,
35
37
) ;
36
38
} ;
37
39
}
@@ -71,10 +73,7 @@ fn alignment() {
71
73
assert_alignment ! ( iso8601:: FormattedComponents , 1 ) ;
72
74
assert_alignment ! ( iso8601:: OffsetPrecision , 1 ) ;
73
75
assert_alignment ! ( iso8601:: TimePrecision , 1 ) ;
74
- #[ cfg( miri) ]
75
- assert_alignment ! ( Parsed , 16 ) ;
76
- #[ cfg( not( miri) ) ]
77
- assert_alignment ! ( Parsed , 8 ) ;
76
+ assert_alignment ! ( Parsed , :: core:: mem:: align_of:: <u128 >( ) ) ;
78
77
assert_alignment ! ( Month , 1 ) ;
79
78
assert_alignment ! ( Weekday , 1 ) ;
80
79
assert_alignment ! ( Error , 8 ) ;
You can’t perform that action at this time.
0 commit comments