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 {
429
429
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
430
430
// Its value depends on the -Zoom={panic,abort} compiler option.
431
431
#[ rustc_std_internal_symbol]
432
- static __rust_alloc_error_handler_should_panic : u8 ;
432
+ fn __rust_alloc_error_handler_should_panic_v2 ( ) -> u8 ;
433
433
}
434
434
435
- if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
435
+ if unsafe { __rust_alloc_error_handler_should_panic_v2 ( ) != 0 } {
436
436
panic ! ( "memory allocation of {size} bytes failed" )
437
437
} else {
438
438
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) {
349
349
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
350
350
// Its value depends on the -Zoom={panic,abort} compiler option.
351
351
#[ rustc_std_internal_symbol]
352
- static __rust_alloc_error_handler_should_panic : u8 ;
352
+ fn __rust_alloc_error_handler_should_panic_v2 ( ) -> u8 ;
353
353
}
354
354
355
- if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
355
+ if unsafe { __rust_alloc_error_handler_should_panic_v2 ( ) != 0 } {
356
356
panic ! ( "memory allocation of {} bytes failed" , layout. size( ) ) ;
357
357
} else {
358
358
// 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