@@ -23,10 +23,6 @@ use crate::{
23
23
try_init,
24
24
types:: { ForeignOwnable , Opaque } ,
25
25
} ;
26
- #[ cfg( CONFIG_RUST_COERCE_POINTEE ) ]
27
- use core:: marker:: CoercePointee ;
28
- #[ cfg( not( CONFIG_RUST_COERCE_POINTEE ) ) ]
29
- use core:: marker:: Unsize ;
30
26
use core:: {
31
27
alloc:: Layout ,
32
28
fmt,
@@ -130,7 +126,7 @@ mod std_vendor;
130
126
/// # Ok::<(), Error>(())
131
127
/// ```
132
128
#[ repr( transparent) ]
133
- #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( CoercePointee ) ) ]
129
+ #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( core :: marker :: CoercePointee ) ) ]
134
130
pub struct Arc < T : ?Sized > {
135
131
ptr : NonNull < ArcInner < T > > ,
136
132
_p : PhantomData < ArcInner < T > > ,
@@ -179,11 +175,11 @@ impl<T: ?Sized> ArcInner<T> {
179
175
// This is to allow coercion from `Arc<T>` to `Arc<U>` if `T` can be converted to the
180
176
// dynamically-sized type (DST) `U`.
181
177
#[ 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 > { }
183
179
184
180
// This is to allow `Arc<U>` to be dispatched on when `Arc<T>` can be coerced into `Arc<U>`.
185
181
#[ 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 > { }
187
183
188
184
// SAFETY: It is safe to send `Arc<T>` to another thread when the underlying `T` is `Sync` because
189
185
// 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> {
480
476
/// # Ok::<(), Error>(())
481
477
/// ```
482
478
#[ repr( transparent) ]
483
- #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( CoercePointee ) ) ]
479
+ #[ cfg_attr( CONFIG_RUST_COERCE_POINTEE , derive( core :: marker :: CoercePointee ) ) ]
484
480
pub struct ArcBorrow < ' a , T : ?Sized + ' a > {
485
481
inner : NonNull < ArcInner < T > > ,
486
482
_p : PhantomData < & ' a ( ) > ,
@@ -489,7 +485,7 @@ pub struct ArcBorrow<'a, T: ?Sized + 'a> {
489
485
// This is to allow `ArcBorrow<U>` to be dispatched on when `ArcBorrow<T>` can be coerced into
490
486
// `ArcBorrow<U>`.
491
487
#[ 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 > >
493
489
for ArcBorrow < ' _ , T >
494
490
{
495
491
}
0 commit comments