File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/stable_mir/src/mir Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -672,19 +672,19 @@ pub struct SwitchTargets {
672672impl SwitchTargets {
673673 /// All possible targets including the `otherwise` target.
674674 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 ) )
678676 . collect ( )
679677 }
680678
681679 /// The `otherwise` branch target.
682680 pub fn otherwise ( & self ) -> BasicBlockIdx {
681+ eprintln ! ( "Otherwise: {:?}" , self . otherwise) ;
683682 self . otherwise
684683 }
685684
686685 /// The conditional targets which are only taken if the pattern matches the given value.
687686 pub fn branches ( & self ) -> impl Iterator < Item = ( u128 , BasicBlockIdx ) > + ' _ {
687+ eprintln ! ( "Branches: {:?}" , self . branches) ;
688688 self . branches . iter ( ) . copied ( )
689689 }
690690
@@ -695,6 +695,7 @@ impl SwitchTargets {
695695
696696 /// Create a new SwitchTargets from the given branches and `otherwise` target.
697697 pub fn new ( branches : Vec < ( u128 , BasicBlockIdx ) > , otherwise : BasicBlockIdx ) -> SwitchTargets {
698+ eprintln ! ( "Branches: {branches:?} -- otherwise: {otherwise:?}" ) ;
698699 SwitchTargets { branches, otherwise }
699700 }
700701}
You can’t perform that action at this time.
0 commit comments