We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb5ed29 commit 8e9c8ddCopy full SHA for 8e9c8dd
library/core/src/alloc/mod.rs
@@ -116,6 +116,10 @@ pub unsafe trait Allocator {
116
/// The returned block may have a larger size than specified by `layout.size()`, and may or may
117
/// not have its contents initialized.
118
///
119
+ /// The returned block of memory remains valid as long as it is [*currently allocated*] and the shorter of:
120
+ /// - the borrow-checker lifetime of the allocator type itself.
121
+ /// - as long as at the allocator and all its clones has not been dropped.
122
+ ///
123
/// # Errors
124
125
/// Returning `Err` indicates that either memory is exhausted or `layout` does not meet
0 commit comments