File tree 1 file changed +4
-3
lines changed
compiler/stable_mir/src/mir
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -672,19 +672,19 @@ pub struct SwitchTargets {
672
672
impl SwitchTargets {
673
673
/// All possible targets including the `otherwise` target.
674
674
pub fn all_targets ( & self ) -> Successors {
675
- Some ( self . otherwise )
676
- . into_iter ( )
677
- . chain ( self . branches . iter ( ) . map ( |( _, target) | * target) )
675
+ self . branches . iter ( ) . map ( |( _, target) | * target) . chain ( Some ( self . otherwise ) )
678
676
. collect ( )
679
677
}
680
678
681
679
/// The `otherwise` branch target.
682
680
pub fn otherwise ( & self ) -> BasicBlockIdx {
681
+ eprintln ! ( "Otherwise: {:?}" , self . otherwise) ;
683
682
self . otherwise
684
683
}
685
684
686
685
/// The conditional targets which are only taken if the pattern matches the given value.
687
686
pub fn branches ( & self ) -> impl Iterator < Item = ( u128 , BasicBlockIdx ) > + ' _ {
687
+ eprintln ! ( "Branches: {:?}" , self . branches) ;
688
688
self . branches . iter ( ) . copied ( )
689
689
}
690
690
@@ -695,6 +695,7 @@ impl SwitchTargets {
695
695
696
696
/// Create a new SwitchTargets from the given branches and `otherwise` target.
697
697
pub fn new ( branches : Vec < ( u128 , BasicBlockIdx ) > , otherwise : BasicBlockIdx ) -> SwitchTargets {
698
+ eprintln ! ( "Branches: {branches:?} -- otherwise: {otherwise:?}" ) ;
698
699
SwitchTargets { branches, otherwise }
699
700
}
700
701
}
You can’t perform that action at this time.
0 commit comments