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::{
2626#[ test]
2727fn alignment ( ) {
2828 macro_rules! assert_alignment {
29- ( $t: ty, $alignment: literal) => {
29+ ( $t: ty, $alignment: expr) => {
30+ let alignment = $alignment;
3031 assert_eq!(
3132 :: core:: mem:: align_of:: <$t>( ) ,
32- $ alignment,
33- concat! ( "alignment of `{}` was " , $alignment ) ,
33+ alignment,
34+ "alignment of `{}` was {}" ,
3435 stringify!( $t) ,
36+ alignment,
3537 ) ;
3638 } ;
3739 }
@@ -71,10 +73,7 @@ fn alignment() {
7173 assert_alignment ! ( iso8601:: FormattedComponents , 1 ) ;
7274 assert_alignment ! ( iso8601:: OffsetPrecision , 1 ) ;
7375 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 >( ) ) ;
7877 assert_alignment ! ( Month , 1 ) ;
7978 assert_alignment ! ( Weekday , 1 ) ;
8079 assert_alignment ! ( Error , 8 ) ;
You can’t perform that action at this time.
0 commit comments