File tree 1 file changed +2
-3
lines changed
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;
111
111
use crate :: fmt;
112
112
use crate :: intrinsics;
113
113
114
- #[ allow( unused_imports) ]
115
- use crate :: mem:: align_of;
116
-
117
114
use crate :: hint:: spin_loop;
118
115
119
116
/// Signals the processor that it is inside a busy-wait spin-loop ("spin lock").
@@ -861,6 +858,7 @@ impl<T> AtomicPtr<T> {
861
858
#[ cfg( target_has_atomic_equal_alignment = "ptr" ) ]
862
859
#[ unstable( feature = "atomic_from_mut" , issue = "76314" ) ]
863
860
pub fn from_mut ( v : & mut * mut T ) -> & Self {
861
+ use crate :: mem:: align_of;
864
862
let [ ] = [ ( ) ; align_of :: < AtomicPtr < ( ) > > ( ) - align_of :: < * mut ( ) > ( ) ] ;
865
863
// SAFETY:
866
864
// - the mutable reference guarantees unique ownership.
@@ -1311,6 +1309,7 @@ assert_eq!(some_int, 100);
1311
1309
#[ $cfg_align]
1312
1310
#[ unstable( feature = "atomic_from_mut" , issue = "76314" ) ]
1313
1311
pub fn from_mut( v: & mut $int_type) -> & Self {
1312
+ use crate :: mem:: align_of;
1314
1313
let [ ] = [ ( ) ; align_of:: <Self >( ) - align_of:: <$int_type>( ) ] ;
1315
1314
// SAFETY:
1316
1315
// - the mutable reference guarantees unique ownership.
You can’t perform that action at this time.
0 commit comments