Clarify guarantees for Box allocation

This commit is contained in:
Jethro Beekman 2019-02-05 16:56:19 +05:30
parent 8ae730a442
commit e41e694d9e
2 changed files with 13 additions and 0 deletions

View file

@ -34,6 +34,9 @@ extern "Rust" {
/// This type implements the [`Alloc`] trait by forwarding calls
/// to the allocator registered with the `#[global_allocator]` attribute
/// if there is one, or the `std` crates default.
///
/// Note: while this type is unstable, the functionality it provides can be
/// accessed through the [free functions in `alloc`](index.html#functions).
#[unstable(feature = "allocator_api", issue = "32838")]
#[derive(Copy, Clone, Default, Debug)]
pub struct Global;