From 2ff1a029807a06b28cf0e39686dc3b5748a30fa6 Mon Sep 17 00:00:00 2001 From: BioTomateDE Date: Thu, 12 Nov 2026 21:17:56 +0100 Subject: [PATCH 1/2] Fix docs of alloc fn: Allocator API stabilized --- library/alloc/src/alloc.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index 06bc8a589e1fc..bb2670da6cf9e 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -119,8 +119,7 @@ unsafe impl core::alloc::StaticAllocator for Global {} /// /// Users of this function have to consider that in the future, allocators may be allowed to unwind. /// -/// This function is expected to be deprecated in favor of the `allocate` method -/// of the [`Global`] type when it and the [`Allocator`] trait become stable. +/// This function is expected to be deprecated in favor of the `allocate` method of the [`Global`] type. /// /// # Safety /// From 371f04d741e7cc2e9b997c2eea6e7a32cae61ce9 Mon Sep 17 00:00:00 2001 From: Jubilee Date: Tue, 17 Nov 2026 11:32:46 -0800 Subject: [PATCH 2/2] Suggest using `Global.allocate` instead --- library/alloc/src/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index bb2670da6cf9e..1bb17abbe661e 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -119,7 +119,7 @@ unsafe impl core::alloc::StaticAllocator for Global {} /// /// Users of this function have to consider that in the future, allocators may be allowed to unwind. /// -/// This function is expected to be deprecated in favor of the `allocate` method of the [`Global`] type. +/// Calling [`Allocator::allocate`] on `Global` is preferred. /// /// # Safety ///