@@ -108,12 +108,6 @@ macro_rules! make_mir_visitor {
108
108
self . super_terminator( terminator, location) ;
109
109
}
110
110
111
- fn visit_terminator_kind( & mut self ,
112
- kind: & $( $mutability) ? TerminatorKind <' tcx>,
113
- location: Location ) {
114
- self . super_terminator_kind( kind, location) ;
115
- }
116
-
117
111
fn visit_assert_message( & mut self ,
118
112
msg: & $( $mutability) ? AssertMessage <' tcx>,
119
113
location: Location ) {
@@ -417,12 +411,6 @@ macro_rules! make_mir_visitor {
417
411
let Terminator { source_info, kind } = terminator;
418
412
419
413
self . visit_source_info( source_info) ;
420
- self . visit_terminator_kind( kind, location) ;
421
- }
422
-
423
- fn super_terminator_kind( & mut self ,
424
- kind: & $( $mutability) ? TerminatorKind <' tcx>,
425
- source_location: Location ) {
426
414
match kind {
427
415
TerminatorKind :: Goto { .. } |
428
416
TerminatorKind :: Resume |
@@ -440,7 +428,7 @@ macro_rules! make_mir_visitor {
440
428
self . visit_local(
441
429
& $( $mutability) ? local,
442
430
PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Move ) ,
443
- source_location ,
431
+ location ,
444
432
) ;
445
433
446
434
assert_eq!(
@@ -456,34 +444,34 @@ macro_rules! make_mir_visitor {
456
444
values: _,
457
445
targets: _
458
446
} => {
459
- self . visit_operand( discr, source_location ) ;
460
- self . visit_ty( switch_ty, TyContext :: Location ( source_location ) ) ;
447
+ self . visit_operand( discr, location ) ;
448
+ self . visit_ty( switch_ty, TyContext :: Location ( location ) ) ;
461
449
}
462
450
463
451
TerminatorKind :: Drop {
464
- location ,
452
+ place ,
465
453
target: _,
466
454
unwind: _,
467
455
} => {
468
456
self . visit_place(
469
- location ,
457
+ place ,
470
458
PlaceContext :: MutatingUse ( MutatingUseContext :: Drop ) ,
471
- source_location
459
+ location
472
460
) ;
473
461
}
474
462
475
463
TerminatorKind :: DropAndReplace {
476
- location ,
464
+ place ,
477
465
value,
478
466
target: _,
479
467
unwind: _,
480
468
} => {
481
469
self . visit_place(
482
- location ,
470
+ place ,
483
471
PlaceContext :: MutatingUse ( MutatingUseContext :: Drop ) ,
484
- source_location
472
+ location
485
473
) ;
486
- self . visit_operand( value, source_location ) ;
474
+ self . visit_operand( value, location ) ;
487
475
}
488
476
489
477
TerminatorKind :: Call {
@@ -494,15 +482,15 @@ macro_rules! make_mir_visitor {
494
482
from_hir_call: _,
495
483
fn_span: _
496
484
} => {
497
- self . visit_operand( func, source_location ) ;
485
+ self . visit_operand( func, location ) ;
498
486
for arg in args {
499
- self . visit_operand( arg, source_location ) ;
487
+ self . visit_operand( arg, location ) ;
500
488
}
501
489
if let Some ( ( destination, _) ) = destination {
502
490
self . visit_place(
503
491
destination,
504
492
PlaceContext :: MutatingUse ( MutatingUseContext :: Call ) ,
505
- source_location
493
+ location
506
494
) ;
507
495
}
508
496
}
@@ -514,8 +502,8 @@ macro_rules! make_mir_visitor {
514
502
target: _,
515
503
cleanup: _,
516
504
} => {
517
- self . visit_operand( cond, source_location ) ;
518
- self . visit_assert_message( msg, source_location ) ;
505
+ self . visit_operand( cond, location ) ;
506
+ self . visit_assert_message( msg, location ) ;
519
507
}
520
508
521
509
TerminatorKind :: Yield {
@@ -524,11 +512,11 @@ macro_rules! make_mir_visitor {
524
512
resume_arg,
525
513
drop: _,
526
514
} => {
527
- self . visit_operand( value, source_location ) ;
515
+ self . visit_operand( value, location ) ;
528
516
self . visit_place(
529
517
resume_arg,
530
518
PlaceContext :: MutatingUse ( MutatingUseContext :: Yield ) ,
531
- source_location ,
519
+ location ,
532
520
) ;
533
521
}
534
522
@@ -543,29 +531,29 @@ macro_rules! make_mir_visitor {
543
531
match op {
544
532
InlineAsmOperand :: In { value, .. }
545
533
| InlineAsmOperand :: Const { value } => {
546
- self . visit_operand( value, source_location ) ;
534
+ self . visit_operand( value, location ) ;
547
535
}
548
536
InlineAsmOperand :: Out { place, .. } => {
549
537
if let Some ( place) = place {
550
538
self . visit_place(
551
539
place,
552
540
PlaceContext :: MutatingUse ( MutatingUseContext :: Store ) ,
553
- source_location ,
541
+ location ,
554
542
) ;
555
543
}
556
544
}
557
545
InlineAsmOperand :: InOut { in_value, out_place, .. } => {
558
- self . visit_operand( in_value, source_location ) ;
546
+ self . visit_operand( in_value, location ) ;
559
547
if let Some ( out_place) = out_place {
560
548
self . visit_place(
561
549
out_place,
562
550
PlaceContext :: MutatingUse ( MutatingUseContext :: Store ) ,
563
- source_location ,
551
+ location ,
564
552
) ;
565
553
}
566
554
}
567
555
InlineAsmOperand :: SymFn { value } => {
568
- self . visit_constant( value, source_location ) ;
556
+ self . visit_constant( value, location ) ;
569
557
}
570
558
InlineAsmOperand :: SymStatic { def_id: _ } => { }
571
559
}
0 commit comments