@@ -303,7 +303,10 @@ where
303
303
} else if !self . assume . alignment
304
304
&& src_ref. min_align ( ) < dst_ref. min_align ( )
305
305
{
306
- Err ( Reason :: DstHasStricterAlignment )
306
+ Err ( Reason :: DstHasStricterAlignment {
307
+ src_min_align : src_ref. min_align ( ) ,
308
+ dst_min_align : dst_ref. min_align ( ) ,
309
+ } )
307
310
} else {
308
311
// ...such that `src` is transmutable into `dst`, if
309
312
// `src_ref` is transmutability into `dst_ref`.
@@ -360,13 +363,13 @@ where
360
363
Some ( Condition :: IfAll ( lhs) )
361
364
}
362
365
// If only one side is an IfAll, add the other Condition to it
363
- ( constraint , Some ( Condition :: IfAll ( mut constraints ) ) )
364
- | ( Some ( Condition :: IfAll ( mut constraints ) ) , constraint ) => {
365
- constraints . push ( Ok ( constraint ) ) ;
366
- Some ( Condition :: IfAll ( constraints ) )
366
+ ( Some ( cond ) , Some ( Condition :: IfAll ( mut conds ) ) )
367
+ | ( Some ( Condition :: IfAll ( mut conds ) ) , Some ( cond ) ) => {
368
+ conds . push ( cond ) ;
369
+ Some ( Condition :: IfAll ( conds ) )
367
370
}
368
371
// Otherwise, both lhs and rhs conditions can be combined in a parent IfAll
369
- ( lhs, rhs) => Some ( Condition :: IfAll ( vec ! [ Ok ( lhs) , Ok ( rhs) ] ) ) ,
372
+ ( Some ( lhs) , Some ( rhs) ) => Some ( Condition :: IfAll ( vec ! [ lhs, rhs] ) ) ,
370
373
} )
371
374
}
372
375
@@ -394,13 +397,13 @@ where
394
397
Some ( Condition :: IfAny ( lhs) )
395
398
}
396
399
// If only one side is an IfAny, add the other Condition to it
397
- ( constraint , Some ( Condition :: IfAny ( mut constraints ) ) )
398
- | ( Some ( Condition :: IfAny ( mut constraints ) ) , constraint ) => {
399
- constraints . push ( Ok ( constraint ) ) ;
400
- Some ( Condition :: IfAny ( constraints ) )
400
+ ( Some ( cond ) , Some ( Condition :: IfAny ( mut conds ) ) )
401
+ | ( Some ( Condition :: IfAny ( mut conds ) ) , Some ( cond ) ) => {
402
+ conds . push ( cond ) ;
403
+ Some ( Condition :: IfAny ( conds ) )
401
404
}
402
405
// Otherwise, both lhs and rhs conditions can be combined in a parent IfAny
403
- ( lhs, rhs) => Some ( Condition :: IfAny ( vec ! [ Ok ( lhs) , Ok ( rhs) ] ) ) ,
406
+ ( Some ( lhs) , Some ( rhs) ) => Some ( Condition :: IfAny ( vec ! [ lhs, rhs] ) ) ,
404
407
} )
405
408
}
406
409
0 commit comments