File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -429,10 +429,10 @@ pub mod __alloc_error_handler {
429429 // This symbol is emitted by rustc next to __rust_alloc_error_handler.
430430 // Its value depends on the -Zoom={panic,abort} compiler option.
431431 #[ rustc_std_internal_symbol]
432- static __rust_alloc_error_handler_should_panic : u8 ;
432+ fn __rust_alloc_error_handler_should_panic_v2 ( ) -> u8 ;
433433 }
434434
435- if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
435+ if unsafe { __rust_alloc_error_handler_should_panic_v2 ( ) != 0 } {
436436 panic ! ( "memory allocation of {size} bytes failed" )
437437 } else {
438438 core:: panicking:: panic_nounwind_fmt (
Original file line number Diff line number Diff line change @@ -349,10 +349,10 @@ fn default_alloc_error_hook(layout: Layout) {
349349 // This symbol is emitted by rustc next to __rust_alloc_error_handler.
350350 // Its value depends on the -Zoom={panic,abort} compiler option.
351351 #[ rustc_std_internal_symbol]
352- static __rust_alloc_error_handler_should_panic : u8 ;
352+ fn __rust_alloc_error_handler_should_panic_v2 ( ) -> u8 ;
353353 }
354354
355- if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
355+ if unsafe { __rust_alloc_error_handler_should_panic_v2 ( ) != 0 } {
356356 panic ! ( "memory allocation of {} bytes failed" , layout. size( ) ) ;
357357 } else {
358358 // This is the default path taken on OOM, and the only path taken on stable with std.
You can’t perform that action at this time.
0 commit comments