We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60b1d20 commit 188480bCopy full SHA for 188480b
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