Add comment to `AllocRef` implementation for `System`

This commit is contained in:
Tim Diekmann 2020-03-25 18:30:14 +01:00
parent 2f215b61b6
commit d9d35cc696
1 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,8 @@ pub use alloc_crate::alloc::*;
#[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]