@@ -681,28 +681,25 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
681
681
bx. switch_to_block ( panic_block) ;
682
682
self . set_debug_loc ( bx, terminator. source_info ) ;
683
683
684
- // Get the location information.
685
- let location = self . get_caller_location ( bx, terminator. source_info ) . immediate ( ) ;
686
-
687
684
// Put together the arguments to the panic entry point.
688
685
let ( lang_item, args) = match msg {
689
686
AssertKind :: BoundsCheck { ref len, ref index } => {
690
687
let len = self . codegen_operand ( bx, len) . immediate ( ) ;
691
688
let index = self . codegen_operand ( bx, index) . immediate ( ) ;
692
689
// It's `fn panic_bounds_check(index: usize, len: usize)`,
693
690
// and `#[track_caller]` adds an implicit third argument.
694
- ( LangItem :: PanicBoundsCheck , vec ! [ index, len, location ] )
691
+ ( LangItem :: PanicBoundsCheck , vec ! [ index, len] )
695
692
}
696
693
AssertKind :: MisalignedPointerDereference { ref required, ref found } => {
697
694
let required = self . codegen_operand ( bx, required) . immediate ( ) ;
698
695
let found = self . codegen_operand ( bx, found) . immediate ( ) ;
699
696
// It's `fn panic_misaligned_pointer_dereference(required: usize, found: usize)`,
700
697
// and `#[track_caller]` adds an implicit third argument.
701
- ( LangItem :: PanicMisalignedPointerDereference , vec ! [ required, found, location ] )
698
+ ( LangItem :: PanicMisalignedPointerDereference , vec ! [ required, found] )
702
699
}
703
700
_ => {
704
701
// It's `pub fn panic_...()` and `#[track_caller]` adds an implicit argument.
705
- ( msg. panic_function ( ) , vec ! [ location ] )
702
+ ( msg. panic_function ( ) , vec ! [ ] )
706
703
}
707
704
} ;
708
705
0 commit comments