@@ -26,7 +26,7 @@ pub fn size_of<T>() -> uint {
2626
2727/// Returns the size of the type that `_val` points to in bytes.
2828#[ inline]
29- #[ unstable = "the name of this function may change slightly before stabilizing" ]
29+ #[ stable ]
3030pub fn size_of_val < T > ( _val : & T ) -> uint {
3131 size_of :: < T > ( )
3232}
@@ -64,7 +64,7 @@ pub fn min_align_of<T>() -> uint {
6464/// Returns the ABI-required minimum alignment of the type of the value that
6565/// `_val` points to
6666#[ inline]
67- #[ unstable = "the name of this function may change slightly before stabilizing" ]
67+ #[ stable ]
6868pub fn min_align_of_val < T > ( _val : & T ) -> uint {
6969 min_align_of :: < T > ( )
7070}
@@ -90,7 +90,7 @@ pub fn align_of<T>() -> uint {
9090/// as trait objects (in the future), returning the alignment for an arbitrary
9191/// value at runtime.
9292#[ inline]
93- #[ unstable = "the name of this function may change slightly before stabilizing" ]
93+ #[ stable ]
9494pub fn align_of_val < T > ( _val : & T ) -> uint {
9595 align_of :: < T > ( )
9696}
@@ -117,7 +117,7 @@ pub fn pref_align_of_val<T>(val: &T) -> uint { align_of_val(val) }
117117///
118118/// This is useful for FFI functions sometimes, but should generally be avoided.
119119#[ inline]
120- #[ unstable = "the name of this function is subject to change" ]
120+ #[ stable ]
121121pub unsafe fn zeroed < T > ( ) -> T {
122122 intrinsics:: init ( )
123123}
@@ -136,7 +136,14 @@ pub unsafe fn init<T>() -> T { zeroed() }
136136///
137137/// This is useful for FFI functions sometimes, but should generally be avoided.
138138#[ inline]
139- #[ unstable = "the name of this function is subject to change" ]
139+ #[ stable]
140+ pub unsafe fn uninitialized < T > ( ) -> T {
141+ intrinsics:: uninit ( )
142+ }
143+
144+ /// Deprecated, use `uninitialized` instead.
145+ #[ inline]
146+ #[ deprecated = "this function has been renamed to `uninitialized`" ]
140147pub unsafe fn uninit < T > ( ) -> T {
141148 intrinsics:: uninit ( )
142149}
@@ -148,7 +155,7 @@ pub unsafe fn uninit<T>() -> T {
148155/// contained at the location `dst`. This could leak allocations or resources,
149156/// so care must be taken to previously deallocate the value at `dst`.
150157#[ inline]
151- #[ unstable = "the name of this function is subject to change" ]
158+ #[ stable ]
152159pub unsafe fn overwrite < T > ( dst : * mut T , src : T ) {
153160 intrinsics:: move_val_init ( & mut * dst, src)
154161}
@@ -315,7 +322,7 @@ pub fn from_be64(x: u64) -> u64 { x }
315322pub fn swap < T > ( x : & mut T , y : & mut T ) {
316323 unsafe {
317324 // Give ourselves some scratch space to work with
318- let mut t: T = uninit ( ) ;
325+ let mut t: T = uninitialized ( ) ;
319326
320327 // Perform the swap, `&mut` pointers never alias
321328 ptr:: copy_nonoverlapping_memory ( & mut t, & * x, 1 ) ;
0 commit comments