@@ -90,9 +90,11 @@ pub unsafe trait Tag: Copy {
9090
9191unsafe impl < T > Pointer for Box < T > {
9292 const BITS : usize = std:: mem:: align_of :: < T > ( ) . trailing_zeros ( ) as usize ;
93+ #[ inline]
9394 fn into_usize ( self ) -> usize {
9495 Box :: into_raw ( self ) as usize
9596 }
97+ #[ inline]
9698 unsafe fn from_usize ( ptr : usize ) -> Self {
9799 Box :: from_raw ( ptr as * mut T )
98100 }
@@ -104,9 +106,11 @@ unsafe impl<T> Pointer for Box<T> {
104106
105107unsafe impl < T > Pointer for Rc < T > {
106108 const BITS : usize = std:: mem:: align_of :: < T > ( ) . trailing_zeros ( ) as usize ;
109+ #[ inline]
107110 fn into_usize ( self ) -> usize {
108111 Rc :: into_raw ( self ) as usize
109112 }
113+ #[ inline]
110114 unsafe fn from_usize ( ptr : usize ) -> Self {
111115 Rc :: from_raw ( ptr as * const T )
112116 }
@@ -118,9 +122,11 @@ unsafe impl<T> Pointer for Rc<T> {
118122
119123unsafe impl < T > Pointer for Arc < T > {
120124 const BITS : usize = std:: mem:: align_of :: < T > ( ) . trailing_zeros ( ) as usize ;
125+ #[ inline]
121126 fn into_usize ( self ) -> usize {
122127 Arc :: into_raw ( self ) as usize
123128 }
129+ #[ inline]
124130 unsafe fn from_usize ( ptr : usize ) -> Self {
125131 Arc :: from_raw ( ptr as * const T )
126132 }
@@ -132,9 +138,11 @@ unsafe impl<T> Pointer for Arc<T> {
132138
133139unsafe impl < ' a , T : ' a > Pointer for & ' a T {
134140 const BITS : usize = std:: mem:: align_of :: < T > ( ) . trailing_zeros ( ) as usize ;
141+ #[ inline]
135142 fn into_usize ( self ) -> usize {
136143 self as * const T as usize
137144 }
145+ #[ inline]
138146 unsafe fn from_usize ( ptr : usize ) -> Self {
139147 & * ( ptr as * const T )
140148 }
@@ -145,9 +153,11 @@ unsafe impl<'a, T: 'a> Pointer for &'a T {
145153
146154unsafe impl < ' a , T : ' a > Pointer for & ' a mut T {
147155 const BITS : usize = std:: mem:: align_of :: < T > ( ) . trailing_zeros ( ) as usize ;
156+ #[ inline]
148157 fn into_usize ( self ) -> usize {
149158 self as * mut T as usize
150159 }
160+ #[ inline]
151161 unsafe fn from_usize ( ptr : usize ) -> Self {
152162 & mut * ( ptr as * mut T )
153163 }
0 commit comments