@@ -127,7 +127,7 @@ impl InitializationData<'_, '_> {
127
127
self . uninits . seek_before_primary_effect ( loc) ;
128
128
}
129
129
130
- fn maybe_live_dead ( & self , path : MovePathIndex ) -> ( bool , bool ) {
130
+ fn maybe_init_uninit ( & self , path : MovePathIndex ) -> ( bool , bool ) {
131
131
( self . inits . get ( ) . contains ( path) , self . uninits . get ( ) . contains ( path) )
132
132
}
133
133
}
@@ -153,23 +153,23 @@ impl<'a, 'tcx> DropElaborator<'a, 'tcx> for ElaborateDropsCtxt<'a, 'tcx> {
153
153
154
154
#[ instrument( level = "debug" , skip( self ) , ret) ]
155
155
fn drop_style ( & self , path : Self :: Path , mode : DropFlagMode ) -> DropStyle {
156
- let ( ( maybe_live , maybe_dead ) , multipart) = match mode {
157
- DropFlagMode :: Shallow => ( self . init_data . maybe_live_dead ( path) , false ) ,
156
+ let ( ( maybe_init , maybe_uninit ) , multipart) = match mode {
157
+ DropFlagMode :: Shallow => ( self . init_data . maybe_init_uninit ( path) , false ) ,
158
158
DropFlagMode :: Deep => {
159
- let mut some_live = false ;
160
- let mut some_dead = false ;
159
+ let mut some_maybe_init = false ;
160
+ let mut some_maybe_uninit = false ;
161
161
let mut children_count = 0 ;
162
162
on_all_children_bits ( self . move_data ( ) , path, |child| {
163
- let ( live , dead ) = self . init_data . maybe_live_dead ( child) ;
164
- debug ! ( "elaborate_drop: state({:?}) = {:?}" , child, ( live , dead ) ) ;
165
- some_live |= live ;
166
- some_dead |= dead ;
163
+ let ( maybe_init , maybe_uninit ) = self . init_data . maybe_init_uninit ( child) ;
164
+ debug ! ( "elaborate_drop: state({:?}) = {:?}" , child, ( maybe_init , maybe_uninit ) ) ;
165
+ some_maybe_init |= maybe_init ;
166
+ some_maybe_uninit |= maybe_uninit ;
167
167
children_count += 1 ;
168
168
} ) ;
169
- ( ( some_live , some_dead ) , children_count != 1 )
169
+ ( ( some_maybe_init , some_maybe_uninit ) , children_count != 1 )
170
170
}
171
171
} ;
172
- match ( maybe_live , maybe_dead , multipart) {
172
+ match ( maybe_init , maybe_uninit , multipart) {
173
173
( false , _, _) => DropStyle :: Dead ,
174
174
( true , false , _) => DropStyle :: Static ,
175
175
( true , true , false ) => DropStyle :: Conditional ,
@@ -283,15 +283,15 @@ impl<'a, 'tcx> ElaborateDropsCtxt<'a, 'tcx> {
283
283
LookupResult :: Exact ( path) => {
284
284
self . init_data . seek_before ( self . body . terminator_loc ( bb) ) ;
285
285
on_all_children_bits ( self . move_data ( ) , path, |child| {
286
- let ( maybe_live , maybe_dead ) = self . init_data . maybe_live_dead ( child) ;
286
+ let ( maybe_init , maybe_uninit ) = self . init_data . maybe_init_uninit ( child) ;
287
287
debug ! (
288
288
"collect_drop_flags: collecting {:?} from {:?}@{:?} - {:?}" ,
289
289
child,
290
290
place,
291
291
path,
292
- ( maybe_live , maybe_dead )
292
+ ( maybe_init , maybe_uninit )
293
293
) ;
294
- if maybe_live && maybe_dead {
294
+ if maybe_init && maybe_uninit {
295
295
self . create_drop_flag ( child, terminator. source_info . span )
296
296
}
297
297
} ) ;
@@ -303,8 +303,8 @@ impl<'a, 'tcx> ElaborateDropsCtxt<'a, 'tcx> {
303
303
}
304
304
305
305
self . init_data . seek_before ( self . body . terminator_loc ( bb) ) ;
306
- let ( _maybe_live , maybe_dead ) = self . init_data . maybe_live_dead ( parent) ;
307
- if maybe_dead {
306
+ let ( _maybe_init , maybe_uninit ) = self . init_data . maybe_init_uninit ( parent) ;
307
+ if maybe_uninit {
308
308
self . tcx . dcx ( ) . span_delayed_bug (
309
309
terminator. source_info . span ,
310
310
format ! (
0 commit comments