diff options
| author | bors <bors@rust-lang.org> | 2019-05-20 21:38:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-05-20 21:38:19 +0000 |
| commit | 09189591c4c4f6784ffd4bbe99eaefbfe1d5e4a4 (patch) | |
| tree | e2b332a585664a9225c26a37f9848501c9a7e8c5 /src/liballoc/alloc.rs | |
| parent | d35181ad8785fa958e43580a29a982afe02c728f (diff) | |
| parent | 0c97800f93e13b5339773158502257b556db8392 (diff) | |
| download | rust-09189591c4c4f6784ffd4bbe99eaefbfe1d5e4a4.tar.gz rust-09189591c4c4f6784ffd4bbe99eaefbfe1d5e4a4.zip | |
Auto merge of #60986 - Centril:rollup-nhpgrfb, r=Centril
Rollup of 11 pull requests Successful merges: - #60383 (Fix position source code files toggle) - #60453 (Fall back to `/dev/urandom` on `EPERM` for `getrandom`) - #60487 (Fix search sidebar width when no crate select is present) - #60511 (Fix intra-doc link resolution failure on re-exporting libstd) - #60823 (Fix incremental compilation of cdylib emitting spurious unused_attributes lint) - #60915 (stable hashing: Remove unused field and add documentation.) - #60942 (Misc changes to rustc_metadata) - #60952 (Document BinaryHeap time complexity) - #60959 (rustc: Improve type size assertions) - #60972 (remove confusing remarks about mixed volatile and non-volatile accesses) - #60983 (Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc/alloc.rs')
| -rw-r--r-- | src/liballoc/alloc.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/liballoc/alloc.rs b/src/liballoc/alloc.rs index ddc6481eec7..41ff06d70ff 100644 --- a/src/liballoc/alloc.rs +++ b/src/liballoc/alloc.rs @@ -37,6 +37,8 @@ extern "Rust" { /// /// Note: while this type is unstable, the functionality it provides can be /// accessed through the [free functions in `alloc`](index.html#functions). +/// +/// [`Alloc`]: trait.Alloc.html #[unstable(feature = "allocator_api", issue = "32838")] #[derive(Copy, Clone, Default, Debug)] pub struct Global; @@ -54,6 +56,10 @@ pub struct Global; /// /// See [`GlobalAlloc::alloc`]. /// +/// [`Global`]: struct.Global.html +/// [`Alloc`]: trait.Alloc.html +/// [`GlobalAlloc::alloc`]: trait.GlobalAlloc.html#tymethod.alloc +/// /// # Examples /// /// ``` @@ -87,6 +93,10 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 { /// # Safety /// /// See [`GlobalAlloc::dealloc`]. +/// +/// [`Global`]: struct.Global.html +/// [`Alloc`]: trait.Alloc.html +/// [`GlobalAlloc::dealloc`]: trait.GlobalAlloc.html#tymethod.dealloc #[stable(feature = "global_alloc", since = "1.28.0")] #[inline] pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) { @@ -105,6 +115,10 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) { /// # Safety /// /// See [`GlobalAlloc::realloc`]. +/// +/// [`Global`]: struct.Global.html +/// [`Alloc`]: trait.Alloc.html +/// [`GlobalAlloc::realloc`]: trait.GlobalAlloc.html#method.realloc #[stable(feature = "global_alloc", since = "1.28.0")] #[inline] pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { @@ -124,6 +138,10 @@ pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 /// /// See [`GlobalAlloc::alloc_zeroed`]. /// +/// [`Global`]: struct.Global.html +/// [`Alloc`]: trait.Alloc.html +/// [`GlobalAlloc::alloc_zeroed`]: trait.GlobalAlloc.html#method.alloc_zeroed +/// /// # Examples /// /// ``` |
