@@ -218,26 +218,26 @@ impl<'tcx> HasMoveData<'tcx> for EverInitializedPlaces<'_, 'tcx> {
218218
219219impl < ' a , ' tcx > MaybeInitializedPlaces < ' a , ' tcx > {
220220 fn update_bits (
221- trans : & mut <Self as Analysis < ' tcx > >:: Domain ,
221+ state : & mut <Self as Analysis < ' tcx > >:: Domain ,
222222 path : MovePathIndex ,
223- state : DropFlagState ,
223+ dfstate : DropFlagState ,
224224 ) {
225- match state {
226- DropFlagState :: Absent => trans . kill ( path) ,
227- DropFlagState :: Present => trans . gen_ ( path) ,
225+ match dfstate {
226+ DropFlagState :: Absent => state . kill ( path) ,
227+ DropFlagState :: Present => state . gen_ ( path) ,
228228 }
229229 }
230230}
231231
232232impl < ' tcx > MaybeUninitializedPlaces < ' _ , ' tcx > {
233233 fn update_bits (
234- trans : & mut <Self as Analysis < ' tcx > >:: Domain ,
234+ state : & mut <Self as Analysis < ' tcx > >:: Domain ,
235235 path : MovePathIndex ,
236- state : DropFlagState ,
236+ dfstate : DropFlagState ,
237237 ) {
238- match state {
239- DropFlagState :: Absent => trans . gen_ ( path) ,
240- DropFlagState :: Present => trans . kill ( path) ,
238+ match dfstate {
239+ DropFlagState :: Absent => state . gen_ ( path) ,
240+ DropFlagState :: Present => state . kill ( path) ,
241241 }
242242 }
243243}
@@ -265,12 +265,12 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
265265
266266 fn apply_statement_effect (
267267 & mut self ,
268- trans : & mut Self :: Domain ,
268+ state : & mut Self :: Domain ,
269269 statement : & mir:: Statement < ' tcx > ,
270270 location : Location ,
271271 ) {
272272 drop_flag_effects_for_location ( self . body , self . move_data , location, |path, s| {
273- Self :: update_bits ( trans , path, s)
273+ Self :: update_bits ( state , path, s)
274274 } ) ;
275275
276276 // Mark all places as "maybe init" if they are mutably borrowed. See #90752.
@@ -282,7 +282,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
282282 && let LookupResult :: Exact ( mpi) = self . move_data ( ) . rev_lookup . find ( place. as_ref ( ) )
283283 {
284284 on_all_children_bits ( self . move_data ( ) , mpi, |child| {
285- trans . gen_ ( child) ;
285+ state . gen_ ( child) ;
286286 } )
287287 }
288288 }
@@ -309,7 +309,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
309309
310310 fn apply_call_return_effect (
311311 & mut self ,
312- trans : & mut Self :: Domain ,
312+ state : & mut Self :: Domain ,
313313 _block : mir:: BasicBlock ,
314314 return_places : CallReturnPlaces < ' _ , ' tcx > ,
315315 ) {
@@ -320,7 +320,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
320320 self . move_data ( ) ,
321321 self . move_data ( ) . rev_lookup . find ( place. as_ref ( ) ) ,
322322 |mpi| {
323- trans . gen_ ( mpi) ;
323+ state . gen_ ( mpi) ;
324324 } ,
325325 ) ;
326326 } ) ;
@@ -345,7 +345,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
345345 } ;
346346
347347 let mut discriminants = enum_def. discriminants ( self . tcx ) ;
348- edge_effects. apply ( |trans , edge| {
348+ edge_effects. apply ( |state , edge| {
349349 let Some ( value) = edge. value else {
350350 return ;
351351 } ;
@@ -363,7 +363,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
363363 self . move_data ( ) ,
364364 enum_place,
365365 variant,
366- |mpi| trans . kill ( mpi) ,
366+ |mpi| state . kill ( mpi) ,
367367 ) ;
368368 } ) ;
369369 }
@@ -383,7 +383,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
383383 ChunkedBitSet :: new_empty ( self . move_data ( ) . move_paths . len ( ) )
384384 }
385385
386- // sets on_entry bits for Arg places
386+ // sets state bits for Arg places
387387 fn initialize_start_block ( & self , _: & mir:: Body < ' tcx > , state : & mut Self :: Domain ) {
388388 // set all bits to 1 (uninit) before gathering counter-evidence
389389 state. insert_all ( ) ;
@@ -396,12 +396,12 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
396396
397397 fn apply_statement_effect (
398398 & mut self ,
399- trans : & mut Self :: Domain ,
399+ state : & mut Self :: Domain ,
400400 _statement : & mir:: Statement < ' tcx > ,
401401 location : Location ,
402402 ) {
403403 drop_flag_effects_for_location ( self . body , self . move_data , location, |path, s| {
404- Self :: update_bits ( trans , path, s)
404+ Self :: update_bits ( state , path, s)
405405 } ) ;
406406
407407 // Unlike in `MaybeInitializedPlaces` above, we don't need to change the state when a
@@ -410,12 +410,12 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
410410
411411 fn apply_terminator_effect < ' mir > (
412412 & mut self ,
413- trans : & mut Self :: Domain ,
413+ state : & mut Self :: Domain ,
414414 terminator : & ' mir mir:: Terminator < ' tcx > ,
415415 location : Location ,
416416 ) -> TerminatorEdges < ' mir , ' tcx > {
417417 drop_flag_effects_for_location ( self . body , self . move_data , location, |path, s| {
418- Self :: update_bits ( trans , path, s)
418+ Self :: update_bits ( state , path, s)
419419 } ) ;
420420 if self . skip_unreachable_unwind . contains ( location. block ) {
421421 let mir:: TerminatorKind :: Drop { target, unwind, .. } = terminator. kind else { bug ! ( ) } ;
@@ -428,7 +428,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
428428
429429 fn apply_call_return_effect (
430430 & mut self ,
431- trans : & mut Self :: Domain ,
431+ state : & mut Self :: Domain ,
432432 _block : mir:: BasicBlock ,
433433 return_places : CallReturnPlaces < ' _ , ' tcx > ,
434434 ) {
@@ -439,7 +439,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
439439 self . move_data ( ) ,
440440 self . move_data ( ) . rev_lookup . find ( place. as_ref ( ) ) ,
441441 |mpi| {
442- trans . kill ( mpi) ;
442+ state . kill ( mpi) ;
443443 } ,
444444 ) ;
445445 } ) ;
@@ -468,7 +468,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
468468 } ;
469469
470470 let mut discriminants = enum_def. discriminants ( self . tcx ) ;
471- edge_effects. apply ( |trans , edge| {
471+ edge_effects. apply ( |state , edge| {
472472 let Some ( value) = edge. value else {
473473 return ;
474474 } ;
@@ -486,7 +486,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
486486 self . move_data ( ) ,
487487 enum_place,
488488 variant,
489- |mpi| trans . gen_ ( mpi) ,
489+ |mpi| state . gen_ ( mpi) ,
490490 ) ;
491491 } ) ;
492492 }
@@ -512,10 +512,10 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
512512 }
513513 }
514514
515- #[ instrument( skip( self , trans ) , level = "debug" ) ]
515+ #[ instrument( skip( self , state ) , level = "debug" ) ]
516516 fn apply_statement_effect (
517517 & mut self ,
518- trans : & mut Self :: Domain ,
518+ state : & mut Self :: Domain ,
519519 stmt : & mir:: Statement < ' tcx > ,
520520 location : Location ,
521521 ) {
@@ -525,7 +525,7 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
525525 let rev_lookup = & move_data. rev_lookup ;
526526
527527 debug ! ( "initializes move_indexes {:?}" , init_loc_map[ location] ) ;
528- trans . gen_all ( init_loc_map[ location] . iter ( ) . copied ( ) ) ;
528+ state . gen_all ( init_loc_map[ location] . iter ( ) . copied ( ) ) ;
529529
530530 if let mir:: StatementKind :: StorageDead ( local) = stmt. kind {
531531 // End inits for StorageDead, so that an immutable variable can
@@ -535,15 +535,15 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
535535 "clears the ever initialized status of {:?}" ,
536536 init_path_map[ move_path_index]
537537 ) ;
538- trans . kill_all ( init_path_map[ move_path_index] . iter ( ) . copied ( ) ) ;
538+ state . kill_all ( init_path_map[ move_path_index] . iter ( ) . copied ( ) ) ;
539539 }
540540 }
541541 }
542542
543- #[ instrument( skip( self , trans , terminator) , level = "debug" ) ]
543+ #[ instrument( skip( self , state , terminator) , level = "debug" ) ]
544544 fn apply_terminator_effect < ' mir > (
545545 & mut self ,
546- trans : & mut Self :: Domain ,
546+ state : & mut Self :: Domain ,
547547 terminator : & ' mir mir:: Terminator < ' tcx > ,
548548 location : Location ,
549549 ) -> TerminatorEdges < ' mir , ' tcx > {
@@ -552,7 +552,7 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
552552 let init_loc_map = & move_data. init_loc_map ;
553553 debug ! ( ?term) ;
554554 debug ! ( "initializes move_indexes {:?}" , init_loc_map[ location] ) ;
555- trans . gen_all (
555+ state . gen_all (
556556 init_loc_map[ location]
557557 . iter ( )
558558 . filter ( |init_index| {
@@ -565,7 +565,7 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
565565
566566 fn apply_call_return_effect (
567567 & mut self ,
568- trans : & mut Self :: Domain ,
568+ state : & mut Self :: Domain ,
569569 block : mir:: BasicBlock ,
570570 _return_places : CallReturnPlaces < ' _ , ' tcx > ,
571571 ) {
@@ -574,7 +574,7 @@ impl<'tcx> Analysis<'tcx> for EverInitializedPlaces<'_, 'tcx> {
574574
575575 let call_loc = self . body . terminator_loc ( block) ;
576576 for init_index in & init_loc_map[ call_loc] {
577- trans . gen_ ( * init_index) ;
577+ state . gen_ ( * init_index) ;
578578 }
579579 }
580580}
0 commit comments