7
7
//! like `cdylib`s and `staticlib`s are guaranteed to use the [`System`] by
8
8
//! default.
9
9
//!
10
- //! [`System`]: struct.System.html
11
- //!
12
10
//! # The `#[global_allocator]` attribute
13
11
//!
14
12
//! This attribute allows configuring the choice of global allocator.
43
41
//! The attribute is used on a `static` item whose type implements the
44
42
//! [`GlobalAlloc`] trait. This type can be provided by an external library:
45
43
//!
46
- //! [`GlobalAlloc`]: ../../core/alloc/trait.GlobalAlloc.html
47
- //!
48
44
//! ```rust,ignore (demonstrates crates.io usage)
49
45
//! extern crate jemallocator;
50
46
//!
@@ -284,9 +280,6 @@ static HOOK: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut());
284
280
/// about the allocation that failed.
285
281
///
286
282
/// 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
290
283
#[ unstable( feature = "alloc_error_hook" , issue = "51245" ) ]
291
284
pub fn set_alloc_error_hook ( hook : fn ( Layout ) ) {
292
285
HOOK . store ( hook as * mut ( ) , Ordering :: SeqCst ) ;
@@ -297,8 +290,6 @@ pub fn set_alloc_error_hook(hook: fn(Layout)) {
297
290
/// *See also the function [`set_alloc_error_hook`].*
298
291
///
299
292
/// If no custom hook is registered, the default hook will be returned.
300
- ///
301
- /// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html
302
293
#[ unstable( feature = "alloc_error_hook" , issue = "51245" ) ]
303
294
pub fn take_alloc_error_hook ( ) -> fn ( Layout ) {
304
295
let hook = HOOK . swap ( ptr:: null_mut ( ) , Ordering :: SeqCst ) ;
0 commit comments