git: 66070a5e1ccb - main - lang/inko: Fix build with rust 1.89.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Mon, 01 Sep 2025 08:25:59 UTC
The branch main has been updated by mikael:

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

commit 66070a5e1ccbaf5cfb6cf8e2ec3cf19812a1761f
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-08-25 11:51:21 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-09-01 08:24:03 +0000

    lang/inko: Fix build with rust 1.89.0
    
    error: implicit autoref creates a reference to the dereference of a raw pointer
       --> rt/src/runtime.rs:108:20
    
    error: implicit autoref creates a reference to the dereference of a raw pointer
       --> rt/src/runtime/byte_array.rs:58:6
    
    error: implicit autoref creates a reference to the dereference of a raw pointer
       --> rt/src/runtime/process.rs:165:16
    
    error: implicit autoref creates a reference to the dereference of a raw pointer
       --> rt/src/runtime/process.rs:176:16
    
    error: implicit autoref creates a reference to the dereference of a raw pointer
       --> rt/src/runtime/process.rs:186:5
    
    PR:             288923
    
    Approved by:    portmgr (build fix blanket)
---
 lang/inko/files/patch-rust-1.89.0 | 46 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/lang/inko/files/patch-rust-1.89.0 b/lang/inko/files/patch-rust-1.89.0
new file mode 100644
index 000000000000..77da107ad252
--- /dev/null
+++ b/lang/inko/files/patch-rust-1.89.0
@@ -0,0 +1,46 @@
+--- rt/src/runtime/byte_array.rs.orig	2025-08-22 09:33:51 UTC
++++ rt/src/runtime/byte_array.rs
+@@ -50,6 +50,7 @@ pub unsafe extern "system" fn inko_byte_array_set(
+     old_value as i64
+ }
+ 
++#[allow(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern "system" fn inko_byte_array_get(
+     bytes: *mut ByteArray,
+--- rt/src/runtime/process.rs.orig	2025-08-22 09:32:50 UTC
++++ rt/src/runtime/process.rs
+@@ -156,6 +156,7 @@ pub unsafe extern "system" fn inko_process_stacktrace(
+     Box::into_raw(Box::new(process.stacktrace()))
+ }
+ 
++#[allow(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern "system" fn inko_process_stack_frame_name(
+     state: *const State,
+@@ -167,6 +168,7 @@ pub unsafe extern "system" fn inko_process_stack_frame
+     InkoString::alloc((*state).string_type, val.clone())
+ }
+ 
++#[allow(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern "system" fn inko_process_stack_frame_path(
+     state: *const State,
+@@ -178,6 +180,7 @@ pub unsafe extern "system" fn inko_process_stack_frame
+     InkoString::alloc((*state).string_type, val.clone())
+ }
+ 
++#[allow(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern "system" fn inko_process_stack_frame_line(
+     trace: *const Vec<StackFrame>,
+--- rt/src/runtime.rs.orig	2025-08-22 09:32:38 UTC
++++ rt/src/runtime.rs
+@@ -102,6 +102,7 @@ pub unsafe extern "system" fn inko_runtime_state(
+     (*runtime).state.as_ptr() as _
+ }
+ 
++#[allow(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern "system" fn inko_runtime_stack_mask(
+     runtime: *mut Runtime,