1
Fork 0

Alloc vec doc mention cannot undo leak

This commit is contained in:
Ivan Tham 2020-10-10 22:12:28 +08:00 committed by GitHub
parent 176b96516f
commit 66369a6c70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1476,7 +1476,8 @@ impl<T> Vec<T> {
/// `'a`. If the type has only static references, or none at all, then this
/// may be chosen to be `'static`.
///
/// This function is similar to the [`leak`][Box::leak] function on [`Box`].
/// This function is similar to the [`leak`][Box::leak] function on [`Box`]
/// except there are no way to undo the leak yet.
///
/// This function is mainly useful for data that lives for the remainder of
/// the program's life. Dropping the returned reference will cause a memory