@@ -522,40 +522,6 @@ pub fn begin_panic_fmt(msg: &fmt::Arguments,
522
522
begin_panic ( s, file_line_col)
523
523
}
524
524
525
- // FIXME: In PR #42938, we have added the column as info passed to the panic
526
- // handling code. For this, we want to break the ABI of begin_panic.
527
- // This is not possible to do directly, as the stage0 compiler is hardcoded
528
- // to emit a call to begin_panic in src/libsyntax/ext/build.rs, only
529
- // with the file and line number being passed, but not the colum number.
530
- // By changing the compiler source, we can only affect behaviour of higher
531
- // stages. We need to perform the switch over two stage0 replacements, using
532
- // a temporary function begin_panic_new while performing the switch:
533
- // 0. Before the current switch, we told stage1 onward to emit a call
534
- // to begin_panic_new.
535
- // 1. Right now, stage0 calls begin_panic_new with the new ABI,
536
- // begin_panic stops being used. We have changed begin_panic to
537
- // the new ABI, and started to emit calls to begin_panic in higher
538
- // stages again, this time with the new ABI.
539
- // 2. After the second SNAP, stage0 calls begin_panic with the new ABI,
540
- // and we can remove the temporary begin_panic_new function.
541
-
542
- /// This is the entry point of panicking for panic!() and assert!().
543
- #[ cfg( stage0) ]
544
- #[ unstable( feature = "libstd_sys_internals" ,
545
- reason = "used by the panic! macro" ,
546
- issue = "0" ) ]
547
- #[ inline( never) ] #[ cold] // avoid code bloat at the call sites as much as possible
548
- pub fn begin_panic_new < M : Any + Send > ( msg : M , file_line_col : & ( & ' static str , u32 , u32 ) ) -> ! {
549
- // Note that this should be the only allocation performed in this code path.
550
- // Currently this means that panic!() on OOM will invoke this code path,
551
- // but then again we're not really ready for panic on OOM anyway. If
552
- // we do start doing this, then we should propagate this allocation to
553
- // be performed in the parent of this thread instead of the thread that's
554
- // panicking.
555
-
556
- rust_panic_with_hook ( Box :: new ( msg) , file_line_col)
557
- }
558
-
559
525
/// This is the entry point of panicking for panic!() and assert!().
560
526
#[ unstable( feature = "libstd_sys_internals" ,
561
527
reason = "used by the panic! macro" ,
0 commit comments