Skip to content

Commit fbdc749

Browse files
committed
Make __rust_alloc_error_handler_should_panic a function
1 parent 6a88995 commit fbdc749

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

allocator/allocator.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ use alloc::alloc::__alloc_error_handler;
5050

5151
#[rustc_std_internal_symbol]
5252
#[linkage = "weak"]
53-
#[allow(non_upper_case_globals)]
54-
pub static __rust_alloc_error_handler_should_panic: u8 = 1;
53+
pub unsafe fn __rust_alloc_error_handler_should_panic_v2() -> u8 {
54+
1
55+
}
5556

5657
#[rustc_std_internal_symbol]
5758
#[linkage = "weak"]

0 commit comments

Comments
 (0)