]> git.lizzy.rs Git - rust.git/commitdiff
Add comment to `AllocRef` implementation for `System`
authorTim Diekmann <tim.diekmann@3dvision.de>
Wed, 25 Mar 2020 17:30:14 +0000 (18:30 +0100)
committerTim Diekmann <tim.diekmann@3dvision.de>
Thu, 26 Mar 2020 16:12:18 +0000 (17:12 +0100)
src/libstd/alloc.rs

index f295565bec3481279d032febbd489cad5139e560..6e8ac7c90363f1ce1f822753c1a93e8e3d7ef848 100644 (file)
 #[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]