@@ -102,37 +102,37 @@ fn find_dead_unwinds<'a, 'tcx>(
102
102
_ => continue ,
103
103
} ;
104
104
105
- let mut init_data = InitializationData {
106
- live : flow_inits. sets ( ) . on_entry_set_for ( bb. index ( ) ) . to_owned ( ) ,
107
- dead : IdxSetBuf :: new_empty ( env. move_data . move_paths . len ( ) ) ,
108
- } ;
109
- debug ! ( "find_dead_unwinds @ {:?}: {:?}; init_data={:?}" ,
110
- bb, bb_data, init_data. live) ;
111
- for stmt in 0 ..bb_data. statements . len ( ) {
112
- let loc = Location { block : bb, statement_index : stmt } ;
113
- init_data. apply_location ( tcx, mir, env, loc) ;
114
- }
105
+ let mut init_data = InitializationData {
106
+ live : flow_inits. sets ( ) . on_entry_set_for ( bb. index ( ) ) . to_owned ( ) ,
107
+ dead : IdxSetBuf :: new_empty ( env. move_data . move_paths . len ( ) ) ,
108
+ } ;
109
+ debug ! ( "find_dead_unwinds @ {:?}: {:?}; init_data={:?}" ,
110
+ bb, bb_data, init_data. live) ;
111
+ for stmt in 0 ..bb_data. statements . len ( ) {
112
+ let loc = Location { block : bb, statement_index : stmt } ;
113
+ init_data. apply_location ( tcx, mir, env, loc) ;
114
+ }
115
115
116
- let path = match env. move_data . rev_lookup . find ( location) {
117
- LookupResult :: Exact ( e) => e,
118
- LookupResult :: Parent ( ..) => {
119
- debug ! ( "find_dead_unwinds: has parent; skipping" ) ;
120
- continue
121
- }
122
- } ;
116
+ let path = match env. move_data . rev_lookup . find ( location) {
117
+ LookupResult :: Exact ( e) => e,
118
+ LookupResult :: Parent ( ..) => {
119
+ debug ! ( "find_dead_unwinds: has parent; skipping" ) ;
120
+ continue
121
+ }
122
+ } ;
123
123
124
- debug ! ( "find_dead_unwinds @ {:?}: path({:?})={:?}" , bb, location, path) ;
124
+ debug ! ( "find_dead_unwinds @ {:?}: path({:?})={:?}" , bb, location, path) ;
125
125
126
- let mut maybe_live = false ;
127
- on_all_drop_children_bits ( tcx, mir, & env, path, |child| {
128
- let ( child_maybe_live, _) = init_data. state ( child) ;
129
- maybe_live |= child_maybe_live;
130
- } ) ;
126
+ let mut maybe_live = false ;
127
+ on_all_drop_children_bits ( tcx, mir, & env, path, |child| {
128
+ let ( child_maybe_live, _) = init_data. state ( child) ;
129
+ maybe_live |= child_maybe_live;
130
+ } ) ;
131
131
132
- debug ! ( "find_dead_unwinds @ {:?}: maybe_live={}" , bb, maybe_live) ;
133
- if !maybe_live {
134
- dead_unwinds. add ( & bb) ;
135
- }
132
+ debug ! ( "find_dead_unwinds @ {:?}: maybe_live={}" , bb, maybe_live) ;
133
+ if !maybe_live {
134
+ dead_unwinds. add ( & bb) ;
135
+ }
136
136
}
137
137
138
138
dead_unwinds
0 commit comments