diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-06-16 14:33:45 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-18 17:01:34 -0700 |
| commit | 779ca97525176bc1d764f1b88906363290fcf851 (patch) | |
| tree | ed69db47591190fc762c9eff5654098ed4586ce0 /src/libcore | |
| parent | ff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1 (diff) | |
| download | rust-779ca97525176bc1d764f1b88906363290fcf851.tar.gz rust-779ca97525176bc1d764f1b88906363290fcf851.zip | |
Remove `#[stable]` attribute from free-standing endian conversions and mark them as deprecated
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/mem.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index eab344ac7a7..1032b820b27 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -173,84 +173,84 @@ pub unsafe fn move_val_init<T>(dst: &mut T, src: T) { /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_little_endian` instead"] pub fn to_le16(x: u16) -> u16 { x.to_little_endian() } /// Convert an u32 to little endian from the target's endianness. /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_little_endian` instead"] pub fn to_le32(x: u32) -> u32 { x.to_little_endian() } /// Convert an u64 to little endian from the target's endianness. /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_little_endian` instead"] pub fn to_le64(x: u64) -> u64 { x.to_little_endian() } /// Convert an u16 to big endian from the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_big_endian` instead"] pub fn to_be16(x: u16) -> u16 { x.to_big_endian() } /// Convert an u32 to big endian from the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_big_endian` instead"] pub fn to_be32(x: u32) -> u32 { x.to_big_endian() } /// Convert an u64 to big endian from the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::to_big_endian` instead"] pub fn to_be64(x: u64) -> u64 { x.to_big_endian() } /// Convert an u16 from little endian to the target's endianness. /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_little_endian` instead"] pub fn from_le16(x: u16) -> u16 { Int::from_little_endian(x) } /// Convert an u32 from little endian to the target's endianness. /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_little_endian` instead"] pub fn from_le32(x: u32) -> u32 { Int::from_little_endian(x) } /// Convert an u64 from little endian to the target's endianness. /// /// On little endian, this is a no-op. On big endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_little_endian` instead"] pub fn from_le64(x: u64) -> u64 { Int::from_little_endian(x) } /// Convert an u16 from big endian to the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_big_endian` instead"] pub fn from_be16(x: u16) -> u16 { Int::from_big_endian(x) } /// Convert an u32 from big endian to the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_big_endian` instead"] pub fn from_be32(x: u32) -> u32 { Int::from_big_endian(x) } /// Convert an u64 from big endian to the target's endianness. /// /// On big endian, this is a no-op. On little endian, the bytes are swapped. #[inline] -#[stable] +#[deprecated = "use `Int::from_big_endian` instead"] pub fn from_be64(x: u64) -> u64 { Int::from_big_endian(x) } /// Swap the values at two mutable locations of the same type, without |
