File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -296,14 +296,6 @@ pub fn panicking() -> bool {
296296 update_panic_count ( 0 ) != 0
297297}
298298
299- /// Entry point of panic from the libcore crate (`panic_impl` lang item).
300- #[ cfg( not( test) ) ]
301- #[ panic_handler]
302- #[ unwind( allowed) ]
303- pub fn rust_begin_panic ( info : & PanicInfo < ' _ > ) -> ! {
304- continue_panic_fmt ( & info)
305- }
306-
307299/// The entry point for panicking with a formatted message.
308300///
309301/// This is designed to reduce the amount of code required at the call
@@ -327,10 +319,13 @@ pub fn begin_panic_fmt(msg: &fmt::Arguments<'_>,
327319 let ( file, line, col) = * file_line_col;
328320 let location = Location :: internal_constructor ( file, line, col) ;
329321 let info = PanicInfo :: internal_constructor ( Some ( msg) , & location) ;
330- continue_panic_fmt ( & info)
322+ panic_handler ( & info)
331323}
332324
333- fn continue_panic_fmt ( info : & PanicInfo < ' _ > ) -> ! {
325+ /// Entry point of panic from the libcore crate (`panic_impl` lang item).
326+ #[ cfg_attr( not( test) , panic_handler) ]
327+ #[ unwind( allowed) ]
328+ fn panic_handler ( info : & PanicInfo < ' _ > ) -> ! {
334329 struct PanicPayload < ' a > {
335330 inner : & ' a fmt:: Arguments < ' a > ,
336331 string : Option < String > ,
You can’t perform that action at this time.
0 commit comments