File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,6 @@ use crate::cell::UnsafeCell;
111111use crate :: fmt;
112112use crate :: intrinsics;
113113
114- #[ allow( unused_imports) ]
115- use crate :: mem:: align_of;
116-
117114use crate :: hint:: spin_loop;
118115
119116/// Signals the processor that it is inside a busy-wait spin-loop ("spin lock").
@@ -861,6 +858,7 @@ impl<T> AtomicPtr<T> {
861858 #[ cfg( target_has_atomic_equal_alignment = "ptr" ) ]
862859 #[ unstable( feature = "atomic_from_mut" , issue = "76314" ) ]
863860 pub fn from_mut ( v : & mut * mut T ) -> & Self {
861+ use crate :: mem:: align_of;
864862 let [ ] = [ ( ) ; align_of :: < AtomicPtr < ( ) > > ( ) - align_of :: < * mut ( ) > ( ) ] ;
865863 // SAFETY:
866864 // - the mutable reference guarantees unique ownership.
@@ -1311,6 +1309,7 @@ assert_eq!(some_int, 100);
13111309 #[ $cfg_align]
13121310 #[ unstable( feature = "atomic_from_mut" , issue = "76314" ) ]
13131311 pub fn from_mut( v: & mut $int_type) -> & Self {
1312+ use crate :: mem:: align_of;
13141313 let [ ] = [ ( ) ; align_of:: <Self >( ) - align_of:: <$int_type>( ) ] ;
13151314 // SAFETY:
13161315 // - the mutable reference guarantees unique ownership.
You can’t perform that action at this time.
0 commit comments