@@ -108,12 +108,6 @@ macro_rules! make_mir_visitor {
108108 self . super_terminator( terminator, location) ;
109109 }
110110
111- fn visit_terminator_kind( & mut self ,
112- kind: & $( $mutability) ? TerminatorKind <' tcx>,
113- location: Location ) {
114- self . super_terminator_kind( kind, location) ;
115- }
116-
117111 fn visit_assert_message( & mut self ,
118112 msg: & $( $mutability) ? AssertMessage <' tcx>,
119113 location: Location ) {
@@ -417,12 +411,6 @@ macro_rules! make_mir_visitor {
417411 let Terminator { source_info, kind } = terminator;
418412
419413 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 ) {
426414 match kind {
427415 TerminatorKind :: Goto { .. } |
428416 TerminatorKind :: Resume |
@@ -440,7 +428,7 @@ macro_rules! make_mir_visitor {
440428 self . visit_local(
441429 & $( $mutability) ? local,
442430 PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Move ) ,
443- source_location ,
431+ location ,
444432 ) ;
445433
446434 assert_eq!(
@@ -456,34 +444,34 @@ macro_rules! make_mir_visitor {
456444 values: _,
457445 targets: _
458446 } => {
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 ) ) ;
461449 }
462450
463451 TerminatorKind :: Drop {
464- location ,
452+ place ,
465453 target: _,
466454 unwind: _,
467455 } => {
468456 self . visit_place(
469- location ,
457+ place ,
470458 PlaceContext :: MutatingUse ( MutatingUseContext :: Drop ) ,
471- source_location
459+ location
472460 ) ;
473461 }
474462
475463 TerminatorKind :: DropAndReplace {
476- location ,
464+ place ,
477465 value,
478466 target: _,
479467 unwind: _,
480468 } => {
481469 self . visit_place(
482- location ,
470+ place ,
483471 PlaceContext :: MutatingUse ( MutatingUseContext :: Drop ) ,
484- source_location
472+ location
485473 ) ;
486- self . visit_operand( value, source_location ) ;
474+ self . visit_operand( value, location ) ;
487475 }
488476
489477 TerminatorKind :: Call {
@@ -494,15 +482,15 @@ macro_rules! make_mir_visitor {
494482 from_hir_call: _,
495483 fn_span: _
496484 } => {
497- self . visit_operand( func, source_location ) ;
485+ self . visit_operand( func, location ) ;
498486 for arg in args {
499- self . visit_operand( arg, source_location ) ;
487+ self . visit_operand( arg, location ) ;
500488 }
501489 if let Some ( ( destination, _) ) = destination {
502490 self . visit_place(
503491 destination,
504492 PlaceContext :: MutatingUse ( MutatingUseContext :: Call ) ,
505- source_location
493+ location
506494 ) ;
507495 }
508496 }
@@ -514,8 +502,8 @@ macro_rules! make_mir_visitor {
514502 target: _,
515503 cleanup: _,
516504 } => {
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 ) ;
519507 }
520508
521509 TerminatorKind :: Yield {
@@ -524,11 +512,11 @@ macro_rules! make_mir_visitor {
524512 resume_arg,
525513 drop: _,
526514 } => {
527- self . visit_operand( value, source_location ) ;
515+ self . visit_operand( value, location ) ;
528516 self . visit_place(
529517 resume_arg,
530518 PlaceContext :: MutatingUse ( MutatingUseContext :: Yield ) ,
531- source_location ,
519+ location ,
532520 ) ;
533521 }
534522
@@ -543,29 +531,29 @@ macro_rules! make_mir_visitor {
543531 match op {
544532 InlineAsmOperand :: In { value, .. }
545533 | InlineAsmOperand :: Const { value } => {
546- self . visit_operand( value, source_location ) ;
534+ self . visit_operand( value, location ) ;
547535 }
548536 InlineAsmOperand :: Out { place, .. } => {
549537 if let Some ( place) = place {
550538 self . visit_place(
551539 place,
552540 PlaceContext :: MutatingUse ( MutatingUseContext :: Store ) ,
553- source_location ,
541+ location ,
554542 ) ;
555543 }
556544 }
557545 InlineAsmOperand :: InOut { in_value, out_place, .. } => {
558- self . visit_operand( in_value, source_location ) ;
546+ self . visit_operand( in_value, location ) ;
559547 if let Some ( out_place) = out_place {
560548 self . visit_place(
561549 out_place,
562550 PlaceContext :: MutatingUse ( MutatingUseContext :: Store ) ,
563- source_location ,
551+ location ,
564552 ) ;
565553 }
566554 }
567555 InlineAsmOperand :: SymFn { value } => {
568- self . visit_constant( value, source_location ) ;
556+ self . visit_constant( value, location ) ;
569557 }
570558 InlineAsmOperand :: SymStatic { def_id: _ } => { }
571559 }
0 commit comments