diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-05-25 08:40:02 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-05-26 10:26:03 -0400 |
| commit | f6023a01d43557b45dda550ef50d689877b87226 (patch) | |
| tree | 47e9f96271f814a75e54b6137e4b371d250b9b60 /src/libstd | |
| parent | d9c0f0f188eb93fab1077d02de200bc4b961690f (diff) | |
| download | rust-f6023a01d43557b45dda550ef50d689877b87226.tar.gz rust-f6023a01d43557b45dda550ef50d689877b87226.zip | |
use uninit for cast::transmute_copy
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/cast.rs b/src/libstd/cast.rs index cde22afd34a..d4a87f562e1 100644 --- a/src/libstd/cast.rs +++ b/src/libstd/cast.rs @@ -15,7 +15,7 @@ use unstable::intrinsics; /// Casts the value at `src` to U. The two types must have the same length. pub unsafe fn transmute_copy<T, U>(src: &T) -> U { - let mut dest: U = intrinsics::init(); + let mut dest: U = intrinsics::uninit(); { let dest_ptr: *mut u8 = transmute(&mut dest); let src_ptr: *u8 = transmute(src); |
