diff options
| author | bors <bors@rust-lang.org> | 2014-02-09 15:01:32 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-09 15:01:32 -0800 |
| commit | 27f9c7951fb30b299341668f16a6f84169e1379e (patch) | |
| tree | e6efc500d66c8b387401a539544a884762d3a1e9 /src/libstd/io | |
| parent | 7985fbcb4dc88ff0a6b26c8ae81ba189bfa28fe7 (diff) | |
| parent | 1c4a2fd61cd2910985c57007df7a1ed0f6a5d6b5 (diff) | |
| download | rust-27f9c7951fb30b299341668f16a6f84169e1379e.tar.gz rust-27f9c7951fb30b299341668f16a6f84169e1379e.zip | |
auto merge of #12124 : brson/rust/intrinsics, r=thestinger
As mentioned https://github.com/mozilla/rust/pull/11956#issuecomment-34561655 I've taken some of the most commonly-used intrinsics and put them in a more logical place, reduced the amount of code looking in `unstable::intrinsics`. r? @thestinger
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/extensions.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index 49d51cbb26f..240f4c65501 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -51,7 +51,7 @@ impl<'r, R: Reader> Iterator<u8> for Bytes<'r, R> { } pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T { - use unstable::intrinsics::{to_le16, to_le32, to_le64}; + use mem::{to_le16, to_le32, to_le64}; use cast::transmute; // LLVM fails to properly optimize this when using shifts instead of the to_le* intrinsics @@ -77,7 +77,7 @@ pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T { } pub fn u64_to_be_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T { - use unstable::intrinsics::{to_be16, to_be32, to_be64}; + use mem::{to_be16, to_be32, to_be64}; use cast::transmute; // LLVM fails to properly optimize this when using shifts instead of the to_be* intrinsics @@ -105,7 +105,7 @@ pub fn u64_from_be_bytes(data: &[u8], size: uint) -> u64 { use ptr::{copy_nonoverlapping_memory, offset, mut_offset}; - use unstable::intrinsics::from_be64; + use mem::from_be64; use vec::MutableVector; assert!(size <= 8u); |
