Skip to content

Commit 79318b7

Browse files
committed
Update core::mem for isize/usize migration.
1 parent c5db290 commit 79318b7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/mem.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub use intrinsics::forget;
4343
/// ```
4444
#[inline]
4545
#[stable(feature = "rust1", since = "1.0.0")]
46-
pub fn size_of<T>() -> uint {
46+
pub fn size_of<T>() -> usize {
4747
unsafe { intrinsics::size_of::<T>() }
4848
}
4949

@@ -58,7 +58,7 @@ pub fn size_of<T>() -> uint {
5858
/// ```
5959
#[inline]
6060
#[stable(feature = "rust1", since = "1.0.0")]
61-
pub fn size_of_val<T>(_val: &T) -> uint {
61+
pub fn size_of_val<T>(_val: &T) -> usize {
6262
size_of::<T>()
6363
}
6464

@@ -75,7 +75,7 @@ pub fn size_of_val<T>(_val: &T) -> uint {
7575
/// ```
7676
#[inline]
7777
#[stable(feature = "rust1", since = "1.0.0")]
78-
pub fn min_align_of<T>() -> uint {
78+
pub fn min_align_of<T>() -> usize {
7979
unsafe { intrinsics::min_align_of::<T>() }
8080
}
8181

@@ -90,7 +90,7 @@ pub fn min_align_of<T>() -> uint {
9090
/// ```
9191
#[inline]
9292
#[stable(feature = "rust1", since = "1.0.0")]
93-
pub fn min_align_of_val<T>(_val: &T) -> uint {
93+
pub fn min_align_of_val<T>(_val: &T) -> usize {
9494
min_align_of::<T>()
9595
}
9696

@@ -108,7 +108,7 @@ pub fn min_align_of_val<T>(_val: &T) -> uint {
108108
/// ```
109109
#[inline]
110110
#[stable(feature = "rust1", since = "1.0.0")]
111-
pub fn align_of<T>() -> uint {
111+
pub fn align_of<T>() -> usize {
112112
// We use the preferred alignment as the default alignment for a type. This
113113
// appears to be what clang migrated towards as well:
114114
//
@@ -130,7 +130,7 @@ pub fn align_of<T>() -> uint {
130130
/// ```
131131
#[inline]
132132
#[stable(feature = "rust1", since = "1.0.0")]
133-
pub fn align_of_val<T>(_val: &T) -> uint {
133+
pub fn align_of_val<T>(_val: &T) -> usize {
134134
align_of::<T>()
135135
}
136136

@@ -150,7 +150,7 @@ pub fn align_of_val<T>(_val: &T) -> uint {
150150
/// ```
151151
/// use std::mem;
152152
///
153-
/// let x: int = unsafe { mem::zeroed() };
153+
/// let x: i32 = unsafe { mem::zeroed() };
154154
/// ```
155155
#[inline]
156156
#[stable(feature = "rust1", since = "1.0.0")]
@@ -171,7 +171,7 @@ pub unsafe fn zeroed<T>() -> T {
171171
/// ```
172172
/// use std::mem;
173173
///
174-
/// let x: int = unsafe { mem::uninitialized() };
174+
/// let x: i32 = unsafe { mem::uninitialized() };
175175
/// ```
176176
#[inline]
177177
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)