Skip to content

Commit d9d35cc

Browse files
committed
Add comment to AllocRef implementation for System
1 parent 2f215b6 commit d9d35cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libstd/alloc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ pub use alloc_crate::alloc::*;
134134
#[derive(Debug, Default, Copy, Clone)]
135135
pub struct System;
136136

137+
// The AllocRef impl checks the layout size to be non-zero and forwards to the GlobalAlloc impl,
138+
// which is in `std::sys::*::alloc`.
137139
#[unstable(feature = "allocator_api", issue = "32838")]
138140
unsafe impl AllocRef for System {
139141
#[inline]

0 commit comments

Comments
 (0)