diff --git a/ffi/rs/allocator_library/allocator_library.rs b/ffi/rs/allocator_library/allocator_library.rs index fb498d81d7..27661f8754 100644 --- a/ffi/rs/allocator_library/allocator_library.rs +++ b/ffi/rs/allocator_library/allocator_library.rs @@ -80,7 +80,19 @@ fn __rust_alloc_error_handler(size: usize, align: usize) { #[rustc_std_internal_symbol] static mut __rust_alloc_error_handler_should_panic: u8 = 1; +// See https://github.com/rust-lang/rust/pull/143387. +#[linkage = "weak"] +#[rustc_std_internal_symbol] +fn __rust_alloc_error_handler_should_panic_v2() -> u8 { + return 1; +} + // See https://github.com/rust-lang/rust/issues/73632#issuecomment-1563462239 #[linkage = "weak"] #[rustc_std_internal_symbol] static mut __rust_no_alloc_shim_is_unstable: u8 = 0; + +// See https://github.com/rust-lang/rust/pull/141061. +#[linkage = "weak"] +#[rustc_std_internal_symbol] +fn __rust_no_alloc_shim_is_unstable_v2() {} diff --git a/test/integration/cc_common_link/MODULE.bazel b/test/integration/cc_common_link/MODULE.bazel index 249366e6ee..dccd473941 100644 --- a/test/integration/cc_common_link/MODULE.bazel +++ b/test/integration/cc_common_link/MODULE.bazel @@ -24,7 +24,7 @@ rust.toolchain( # Generate a toolchain to be used for rust-based allocator symbols. # A recent enough version of rustc that mangles the internal allocator symbols. -VERSION = "nightly/2025-04-08" +VERSION = "nightly/2025-07-08" rust.repository_set( name = "rust_with_alloc_mangling_linux_x86_64",