Skip to content

Commit dfca61a

Browse files
committed
Elaborate on side effects
1 parent 3d1f676 commit dfca61a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/alloc/global.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ use crate::ptr;
7171
/// optimization that can be applied. You may generally not rely on heap allocations
7272
/// happening, if they can be removed without changing program behaviour.
7373
/// Whether allocations happen or not is not part of the program behaviour, even if it
74-
/// could be detected via an allocator that tracks allocations.
74+
/// could be detected via an allocator that tracks allocations by printing or otherwise
75+
/// having side effects.
7576
#[stable(feature = "global_alloc", since = "1.28.0")]
7677
pub unsafe trait GlobalAlloc {
7778
/// Allocate memory as described by the given `layout`.

0 commit comments

Comments
 (0)