From d9d35cc6967501818863adcb556991357098557d Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Wed, 25 Mar 2020 18:30:14 +0100 Subject: [PATCH] Add comment to `AllocRef` implementation for `System` --- src/libstd/alloc.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index f295565bec3..6e8ac7c9036 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -134,6 +134,8 @@ #[derive(Debug, Default, Copy, Clone)] pub struct System; +// The AllocRef impl checks the layout size to be non-zero and forwards to the GlobalAlloc impl, +// which is in `std::sys::*::alloc`. #[unstable(feature = "allocator_api", issue = "32838")] unsafe impl AllocRef for System { #[inline] -- 2.44.0