77//! like `cdylib`s and `staticlib`s are guaranteed to use the [`System`] by
88//! default.
99//!
10- //! [`System`]: struct.System.html
11- //!
1210//! # The `#[global_allocator]` attribute
1311//!
1412//! This attribute allows configuring the choice of global allocator.
4341//! The attribute is used on a `static` item whose type implements the
4442//! [`GlobalAlloc`] trait. This type can be provided by an external library:
4543//!
46- //! [`GlobalAlloc`]: ../../core/alloc/trait.GlobalAlloc.html
47- //!
4844//! ```rust,ignore (demonstrates crates.io usage)
4945//! extern crate jemallocator;
5046//!
@@ -284,9 +280,6 @@ static HOOK: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut());
284280/// about the allocation that failed.
285281///
286282/// The allocation error hook is a global resource.
287- ///
288- /// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html
289- /// [`take_alloc_error_hook`]: fn.take_alloc_error_hook.html
290283#[ unstable( feature = "alloc_error_hook" , issue = "51245" ) ]
291284pub fn set_alloc_error_hook ( hook : fn ( Layout ) ) {
292285 HOOK . store ( hook as * mut ( ) , Ordering :: SeqCst ) ;
@@ -297,8 +290,6 @@ pub fn set_alloc_error_hook(hook: fn(Layout)) {
297290/// *See also the function [`set_alloc_error_hook`].*
298291///
299292/// If no custom hook is registered, the default hook will be returned.
300- ///
301- /// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html
302293#[ unstable( feature = "alloc_error_hook" , issue = "51245" ) ]
303294pub fn take_alloc_error_hook ( ) -> fn ( Layout ) {
304295 let hook = HOOK . swap ( ptr:: null_mut ( ) , Ordering :: SeqCst ) ;
0 commit comments