@@ -297,7 +297,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
297297 }
298298}
299299
300- struct ArcInnerMetadata {
300+ struct ArcMetadata {
301301 strong : atomic:: AtomicUsize ,
302302
303303 // the value usize::MAX acts as a sentinel for temporarily "locking" the
@@ -306,7 +306,7 @@ struct ArcInnerMetadata {
306306 weak : atomic:: AtomicUsize ,
307307}
308308
309- impl ArcInnerMetadata {
309+ impl ArcMetadata {
310310 #[ inline]
311311 fn new_strong ( ) -> Self {
312312 Self { strong : atomic:: AtomicUsize :: new ( 1 ) , weak : atomic:: AtomicUsize :: new ( 1 ) }
@@ -323,7 +323,7 @@ impl ArcInnerMetadata {
323323// inner types.
324324#[ repr( C ) ]
325325struct ArcInner < T : ?Sized > {
326- meta : ArcInnerMetadata ,
326+ meta : ArcMetadata ,
327327 data : T ,
328328}
329329
@@ -343,7 +343,7 @@ impl<T> Arc<T> {
343343 #[ inline]
344344 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
345345 pub fn new ( data : T ) -> Arc < T > {
346- let x: Box < _ > = box ArcInner { meta : ArcInnerMetadata :: new_strong ( ) , data } ;
346+ let x: Box < _ > = box ArcInner { meta : ArcMetadata :: new_strong ( ) , data } ;
347347 Self :: from_inner ( Box :: leak ( x) . into ( ) )
348348 }
349349
@@ -373,7 +373,7 @@ impl<T> Arc<T> {
373373 // Construct the inner in the "uninitialized" state with a single
374374 // weak reference.
375375 let uninit_ptr: NonNull < _ > = Box :: leak ( box ArcInner {
376- meta : ArcInnerMetadata :: new_weak ( ) ,
376+ meta : ArcMetadata :: new_weak ( ) ,
377377 data : mem:: MaybeUninit :: < T > :: uninit ( ) ,
378378 } )
379379 . into ( ) ;
@@ -503,7 +503,7 @@ impl<T> Arc<T> {
503503 #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
504504 #[ inline]
505505 pub fn try_new ( data : T ) -> Result < Arc < T > , AllocError > {
506- let x: Box < _ > = Box :: try_new ( ArcInner { meta : ArcInnerMetadata :: new_strong ( ) , data } ) ?;
506+ let x: Box < _ > = Box :: try_new ( ArcInner { meta : ArcMetadata :: new_strong ( ) , data } ) ?;
507507 Ok ( Self :: from_inner ( Box :: leak ( x) . into ( ) ) )
508508 }
509509
@@ -2521,7 +2521,7 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
25212521#[ stable( feature = "pin" , since = "1.33.0" ) ]
25222522impl < T : ?Sized > Unpin for Arc < T > { }
25232523
2524- type ArcAllocator = PrefixAllocator < ArcInnerMetadata , Global > ;
2524+ type ArcAllocator = PrefixAllocator < Global , ArcMetadata > ;
25252525
25262526/// Get the offset within an `ArcInner` for the payload behind a pointer.
25272527///
0 commit comments