diff --git a/crates/linker/src/elf.rs b/crates/linker/src/elf.rs index 11db80e4da..5fda7a93bf 100644 --- a/crates/linker/src/elf.rs +++ b/crates/linker/src/elf.rs @@ -10,7 +10,6 @@ use roc_collections::all::MutMap; use roc_error_macros::{internal_error, user_error}; use std::convert::TryFrom; use std::ffi::CStr; -use std::fs; use std::mem; use std::os::raw::c_char; use std::path::Path; @@ -1016,6 +1015,7 @@ pub(crate) fn surgery_elf( // Make sure the final executable has permision to execute. #[cfg(target_family = "unix")] { + use std::fs; use std::os::unix::fs::PermissionsExt; let mut perms = fs::metadata(executable_path) diff --git a/crates/linker/src/macho.rs b/crates/linker/src/macho.rs index f713d51dca..33e304120f 100644 --- a/crates/linker/src/macho.rs +++ b/crates/linker/src/macho.rs @@ -10,7 +10,6 @@ use object::{ use roc_collections::all::MutMap; use roc_error_macros::internal_error; use std::ffi::CStr; -use std::fs; use std::mem; use std::path::Path; use std::time::{Duration, Instant}; @@ -1189,6 +1188,7 @@ pub(crate) fn surgery_macho( // Make sure the final executable has permision to execute. #[cfg(target_family = "unix")] { + use std::fs; use std::os::unix::fs::PermissionsExt; let mut perms = fs::metadata(executable_path)