@@ -48,7 +48,7 @@ unsafe impl<T: ?Sized + Sync> Sync for ThinBox<T> {}
48
48
49
49
#[ unstable( feature = "thin_box" , issue = "92791" ) ]
50
50
impl < T > ThinBox < T > {
51
- /// Moves a type to the heap with its `Metadata` stored in the heap allocation instead of on
51
+ /// Moves a type to the heap with its [ `Metadata`] stored in the heap allocation instead of on
52
52
/// the stack.
53
53
///
54
54
/// # Examples
@@ -59,6 +59,8 @@ impl<T> ThinBox<T> {
59
59
///
60
60
/// let five = ThinBox::new(5);
61
61
/// ```
62
+ ///
63
+ /// [`Metadata`]: core::ptr::Pointee::Metadata
62
64
#[ cfg( not( no_global_oom_handling) ) ]
63
65
pub fn new ( value : T ) -> Self {
64
66
let meta = ptr:: metadata ( & value) ;
@@ -69,7 +71,7 @@ impl<T> ThinBox<T> {
69
71
70
72
#[ unstable( feature = "thin_box" , issue = "92791" ) ]
71
73
impl < Dyn : ?Sized > ThinBox < Dyn > {
72
- /// Moves a type to the heap with its `Metadata` stored in the heap allocation instead of on
74
+ /// Moves a type to the heap with its [ `Metadata`] stored in the heap allocation instead of on
73
75
/// the stack.
74
76
///
75
77
/// # Examples
@@ -80,6 +82,8 @@ impl<Dyn: ?Sized> ThinBox<Dyn> {
80
82
///
81
83
/// let thin_slice = ThinBox::<[i32]>::new_unsize([1, 2, 3, 4]);
82
84
/// ```
85
+ ///
86
+ /// [`Metadata`]: core::ptr::Pointee::Metadata
83
87
#[ cfg( not( no_global_oom_handling) ) ]
84
88
pub fn new_unsize < T > ( value : T ) -> Self
85
89
where
0 commit comments