File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -683,16 +683,6 @@ impl<T> Arc<T> {
683683}
684684
685685impl < T , A : Allocator > Arc < T , A > {
686- /// Returns a reference to the underlying allocator.
687- ///
688- /// Note: this is an associated function, which means that you have
689- /// to call it as `Arc::allocator(&a)` instead of `a.allocator()`. This
690- /// is so that there is no conflict with a method on the inner type.
691- #[ inline]
692- #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
693- pub fn allocator ( this : & Self ) -> & A {
694- & this. alloc
695- }
696686 /// Constructs a new `Arc<T>` in the provided allocator.
697687 ///
698688 /// # Examples
@@ -1465,6 +1455,17 @@ impl<T: ?Sized> Arc<T> {
14651455}
14661456
14671457impl < T : ?Sized , A : Allocator > Arc < T , A > {
1458+ /// Returns a reference to the underlying allocator.
1459+ ///
1460+ /// Note: this is an associated function, which means that you have
1461+ /// to call it as `Arc::allocator(&a)` instead of `a.allocator()`. This
1462+ /// is so that there is no conflict with a method on the inner type.
1463+ #[ inline]
1464+ #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
1465+ pub fn allocator ( this : & Self ) -> & A {
1466+ & this. alloc
1467+ }
1468+
14681469 /// Consumes the `Arc`, returning the wrapped pointer.
14691470 ///
14701471 /// To avoid a memory leak the pointer must be converted back to an `Arc` using
You can’t perform that action at this time.
0 commit comments