diff --git a/src/common/non_utf8/path.rs b/src/common/non_utf8/path.rs index daedefe..33979d9 100644 --- a/src/common/non_utf8/path.rs +++ b/src/common/non_utf8/path.rs @@ -2,6 +2,7 @@ mod display; use alloc::borrow::{Cow, ToOwned}; use alloc::rc::Rc; +#[cfg(target_has_atomic = "ptr")] use alloc::sync::Arc; use core::hash::{Hash, Hasher}; use core::marker::PhantomData; @@ -1259,6 +1260,7 @@ where } } +#[cfg(target_has_atomic = "ptr")] impl From> for Arc> where T: Encoding, @@ -1272,6 +1274,7 @@ where } } +#[cfg(target_has_atomic = "ptr")] impl From<&Path> for Arc> where T: Encoding, diff --git a/src/common/utf8/path.rs b/src/common/utf8/path.rs index 371853a..1979e88 100644 --- a/src/common/utf8/path.rs +++ b/src/common/utf8/path.rs @@ -1,5 +1,6 @@ use alloc::borrow::{Cow, ToOwned}; use alloc::rc::Rc; +#[cfg(target_has_atomic = "ptr")] use alloc::sync::Arc; use core::hash::{Hash, Hasher}; use core::marker::PhantomData; @@ -1245,6 +1246,7 @@ where } } +#[cfg(target_has_atomic = "ptr")] impl From> for Arc> where T: Utf8Encoding, @@ -1258,6 +1260,7 @@ where } } +#[cfg(target_has_atomic = "ptr")] impl From<&Utf8Path> for Arc> where T: Utf8Encoding,