@@ -681,28 +681,25 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
681681 bx. switch_to_block ( panic_block) ;
682682 self . set_debug_loc ( bx, terminator. source_info ) ;
683683
684- // Get the location information.
685- let location = self . get_caller_location ( bx, terminator. source_info ) . immediate ( ) ;
686-
687684 // Put together the arguments to the panic entry point.
688685 let ( lang_item, args) = match msg {
689686 AssertKind :: BoundsCheck { ref len, ref index } => {
690687 let len = self . codegen_operand ( bx, len) . immediate ( ) ;
691688 let index = self . codegen_operand ( bx, index) . immediate ( ) ;
692689 // It's `fn panic_bounds_check(index: usize, len: usize)`,
693690 // and `#[track_caller]` adds an implicit third argument.
694- ( LangItem :: PanicBoundsCheck , vec ! [ index, len, location ] )
691+ ( LangItem :: PanicBoundsCheck , vec ! [ index, len] )
695692 }
696693 AssertKind :: MisalignedPointerDereference { ref required, ref found } => {
697694 let required = self . codegen_operand ( bx, required) . immediate ( ) ;
698695 let found = self . codegen_operand ( bx, found) . immediate ( ) ;
699696 // It's `fn panic_misaligned_pointer_dereference(required: usize, found: usize)`,
700697 // and `#[track_caller]` adds an implicit third argument.
701- ( LangItem :: PanicMisalignedPointerDereference , vec ! [ required, found, location ] )
698+ ( LangItem :: PanicMisalignedPointerDereference , vec ! [ required, found] )
702699 }
703700 _ => {
704701 // It's `pub fn panic_...()` and `#[track_caller]` adds an implicit argument.
705- ( msg. panic_function ( ) , vec ! [ location ] )
702+ ( msg. panic_function ( ) , vec ! [ ] )
706703 }
707704 } ;
708705
0 commit comments