diff options
| author | phosphorus <steepout@qq.com> | 2019-08-19 00:34:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-19 00:34:02 -0500 |
| commit | 92f08b78a12ff119af853cb2bf58468208ea6a90 (patch) | |
| tree | b4636f43c056de11dd69130ce47039343a9f52c5 /src/libstd/alloc.rs | |
| parent | 963184bbb670c1ffa97fc28a98cd5e8473118859 (diff) | |
| parent | a807902dd6b4222179776c3f3c33da8dafdd4da1 (diff) | |
| download | rust-92f08b78a12ff119af853cb2bf58468208ea6a90.tar.gz rust-92f08b78a12ff119af853cb2bf58468208ea6a90.zip | |
Merge pull request #1 from rust-lang/master
Pull from newest repo
Diffstat (limited to 'src/libstd/alloc.rs')
| -rw-r--r-- | src/libstd/alloc.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 4241f47b661..ff52974775b 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -173,6 +173,9 @@ static HOOK: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut()); /// about the allocation that failed. /// /// The allocation error hook is a global resource. +/// +/// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html +/// [`take_alloc_error_hook`]: fn.take_alloc_error_hook.html #[unstable(feature = "alloc_error_hook", issue = "51245")] pub fn set_alloc_error_hook(hook: fn(Layout)) { HOOK.store(hook as *mut (), Ordering::SeqCst); @@ -183,6 +186,8 @@ pub fn set_alloc_error_hook(hook: fn(Layout)) { /// *See also the function [`set_alloc_error_hook`].* /// /// If no custom hook is registered, the default hook will be returned. +/// +/// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html #[unstable(feature = "alloc_error_hook", issue = "51245")] pub fn take_alloc_error_hook() -> fn(Layout) { let hook = HOOK.swap(ptr::null_mut(), Ordering::SeqCst); |
