From 5871fa03d83e4fec68c0d2f0f2f904102391b26e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 14 May 2025 09:26:07 -0700 Subject: [PATCH] Add `unsafe` to a `link_section` attribute. This fixes compatibility with current Rust compilers. --- src/log.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.rs b/src/log.rs index be6d5c2..6dbeeec 100644 --- a/src/log.rs +++ b/src/log.rs @@ -3,7 +3,7 @@ /// c-scape initializes its environment-variable state at /// `.init_array.00098`, so using `.00099` means we run after that, so /// initializing loggers that depend on eg. `RUST_LOG` work. -#[link_section = ".init_array.00099"] +#[unsafe(link_section = ".init_array.00099")] #[used] static INIT_ARRAY: unsafe extern "C" fn() = { unsafe extern "C" fn function() {