@@ -23,10 +23,6 @@ use crate::{
2323 try_init,
2424 types:: { ForeignOwnable , Opaque } ,
2525} ;
26- #[ cfg( CONFIG_RUST_COERCE_POINTEE ) ]
27- use core:: marker:: CoercePointee ;
28- #[ cfg( not( CONFIG_RUST_COERCE_POINTEE ) ) ]
29- use core:: marker:: Unsize ;
3026use core:: {
3127 alloc:: Layout ,
3228 fmt,
@@ -130,7 +126,7 @@ mod std_vendor;
130126/// # Ok::<(), Error>(())
131127/// ```
132128#[ repr( transparent) ]
133- #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( CoercePointee ) ) ]
129+ #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( core :: marker :: CoercePointee ) ) ]
134130pub struct Arc < T : ?Sized > {
135131 ptr : NonNull < ArcInner < T > > ,
136132 _p : PhantomData < ArcInner < T > > ,
@@ -179,11 +175,11 @@ impl<T: ?Sized> ArcInner<T> {
179175// This is to allow coercion from `Arc<T>` to `Arc<U>` if `T` can be converted to the
180176// dynamically-sized type (DST) `U`.
181177#[ cfg( not( CONFIG_RUST_COERCE_POINTEE ) ) ]
182- impl < T : ?Sized + Unsize < U > , U : ?Sized > core:: ops:: CoerceUnsized < Arc < U > > for Arc < T > { }
178+ impl < T : ?Sized + core :: marker :: Unsize < U > , U : ?Sized > core:: ops:: CoerceUnsized < Arc < U > > for Arc < T > { }
183179
184180// This is to allow `Arc<U>` to be dispatched on when `Arc<T>` can be coerced into `Arc<U>`.
185181#[ cfg( not( CONFIG_RUST_COERCE_POINTEE ) ) ]
186- impl < T : ?Sized + Unsize < U > , U : ?Sized > core:: ops:: DispatchFromDyn < Arc < U > > for Arc < T > { }
182+ impl < T : ?Sized + core :: marker :: Unsize < U > , U : ?Sized > core:: ops:: DispatchFromDyn < Arc < U > > for Arc < T > { }
187183
188184// SAFETY: It is safe to send `Arc<T>` to another thread when the underlying `T` is `Sync` because
189185// it effectively means sharing `&T` (which is safe because `T` is `Sync`); additionally, it needs
@@ -480,7 +476,7 @@ impl<T: ?Sized> From<Pin<UniqueArc<T>>> for Arc<T> {
480476/// # Ok::<(), Error>(())
481477/// ```
482478#[ repr( transparent) ]
483- #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( CoercePointee ) ) ]
479+ #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( core :: marker :: CoercePointee ) ) ]
484480pub struct ArcBorrow < ' a , T : ?Sized + ' a > {
485481 inner : NonNull < ArcInner < T > > ,
486482 _p : PhantomData < & ' a ( ) > ,
@@ -489,7 +485,7 @@ pub struct ArcBorrow<'a, T: ?Sized + 'a> {
489485// This is to allow `ArcBorrow<U>` to be dispatched on when `ArcBorrow<T>` can be coerced into
490486// `ArcBorrow<U>`.
491487#[ cfg( not( CONFIG_RUST_COERCE_POINTEE ) ) ]
492- impl < T : ?Sized + Unsize < U > , U : ?Sized > core:: ops:: DispatchFromDyn < ArcBorrow < ' _ , U > >
488+ impl < T : ?Sized + core :: marker :: Unsize < U > , U : ?Sized > core:: ops:: DispatchFromDyn < ArcBorrow < ' _ , U > >
493489 for ArcBorrow < ' _ , T >
494490{
495491}
0 commit comments