git: efd72d5cf05f - main - devel/electron37: adjust patch to unbreak build with rust 1.88

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Tue, 26 Aug 2025 21:56:17 UTC
The branch main has been updated by tagattie:

URL: https://cgit.FreeBSD.org/ports/commit/?id=efd72d5cf05fb4097918e060209908e63ea70301

commit efd72d5cf05fb4097918e060209908e63ea70301
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2025-08-26 21:55:00 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2025-08-26 21:56:05 +0000

    devel/electron37: adjust patch to unbreak build with rust 1.88
    
    Removing __rust_no_alloc_shim_is_unstable was too early. It is still
    required for build to succeed with rust 1.88. So add it back.
    
    Fixes:          bf9da96ad4c8 (devel/electron37: fix build with rust 1.89.0)
---
 devel/electron37/files/patch-build_rust_allocator_lib.rs | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/devel/electron37/files/patch-build_rust_allocator_lib.rs b/devel/electron37/files/patch-build_rust_allocator_lib.rs
index 3ee49686575f..c7a59f7ef428 100644
--- a/devel/electron37/files/patch-build_rust_allocator_lib.rs
+++ b/devel/electron37/files/patch-build_rust_allocator_lib.rs
@@ -1,14 +1,15 @@
 --- build/rust/allocator/lib.rs.orig	2025-08-11 20:33:34 UTC
 +++ build/rust/allocator/lib.rs
-@@ -86,9 +86,8 @@ mod both_allocators {
+@@ -86,6 +86,12 @@ mod both_allocators {
      /// As part of rustc's contract for using `#[global_allocator]` without
      /// rustc-generated shims we must define this symbol, since we are opting in
      /// to unstable functionality. See https://github.com/rust-lang/rust/issues/123015
--    #[no_mangle]
--    #[linkage = "weak"]
--    static __rust_no_alloc_shim_is_unstable: u8 = 0;
 +    #[rustc_std_internal_symbol]
++    #[linkage = "weak"]
 +    fn __rust_no_alloc_shim_is_unstable_v2() {}
- 
-     // Mangle the symbol name as rustc expects.
-     #[rustc_std_internal_symbol]
++
++    // TODO(crbug.com/422538133) Remove after rolling past
++    // https://github.com/rust-lang/rust/pull/141061
+     #[no_mangle]
+     #[linkage = "weak"]
+     static __rust_no_alloc_shim_is_unstable: u8 = 0;