@@ -89,13 +89,11 @@ impl fmt::Display for AllocError {
8989pub unsafe trait AllocRef {
9090 /// Attempts to allocate a block of memory.
9191 ///
92- /// On success, returns a [`NonNull<[u8]>`] meeting the size and alignment guarantees of `layout`.
92+ /// On success, returns a [`NonNull<[u8]>`][NonNull] meeting the size and alignment guarantees of `layout`.
9393 ///
9494 /// The returned block may have a larger size than specified by `layout.size()`, and may or may
9595 /// not have its contents initialized.
9696 ///
97- /// [`NonNull<[u8]>`]: NonNull
98- ///
9997 /// # Errors
10098 ///
10199 /// Returning `Err` indicates that either memory is exhausted or `layout` does not meet
@@ -146,7 +144,7 @@ pub unsafe trait AllocRef {
146144
147145 /// Attempts to extend the memory block.
148146 ///
149- /// Returns a new [`NonNull<[u8]>`] containing a pointer and the actual size of the allocated
147+ /// Returns a new [`NonNull<[u8]>`][NonNull] containing a pointer and the actual size of the allocated
150148 /// memory. The pointer is suitable for holding data described by `new_layout`. To accomplish
151149 /// this, the allocator may extend the allocation referenced by `ptr` to fit the new layout.
152150 ///
@@ -158,8 +156,6 @@ pub unsafe trait AllocRef {
158156 /// If this method returns `Err`, then ownership of the memory block has not been transferred to
159157 /// this allocator, and the contents of the memory block are unaltered.
160158 ///
161- /// [`NonNull<[u8]>`]: NonNull
162- ///
163159 /// # Safety
164160 ///
165161 /// * `ptr` must denote a block of memory [*currently allocated*] via this allocator.
@@ -271,7 +267,7 @@ pub unsafe trait AllocRef {
271267
272268 /// Attempts to shrink the memory block.
273269 ///
274- /// Returns a new [`NonNull<[u8]>`] containing a pointer and the actual size of the allocated
270+ /// Returns a new [`NonNull<[u8]>`][NonNull] containing a pointer and the actual size of the allocated
275271 /// memory. The pointer is suitable for holding data described by `new_layout`. To accomplish
276272 /// this, the allocator may shrink the allocation referenced by `ptr` to fit the new layout.
277273 ///
@@ -283,8 +279,6 @@ pub unsafe trait AllocRef {
283279 /// If this method returns `Err`, then ownership of the memory block has not been transferred to
284280 /// this allocator, and the contents of the memory block are unaltered.
285281 ///
286- /// [`NonNull<[u8]>`]: NonNull
287- ///
288282 /// # Safety
289283 ///
290284 /// * `ptr` must denote a block of memory [*currently allocated*] via this allocator.
0 commit comments