Skip to content

Commit f6023a0

Browse files
committed
use uninit for cast::transmute_copy
1 parent d9c0f0f commit f6023a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use unstable::intrinsics;
1515

1616
/// Casts the value at `src` to U. The two types must have the same length.
1717
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
18-
let mut dest: U = intrinsics::init();
18+
let mut dest: U = intrinsics::uninit();
1919
{
2020
let dest_ptr: *mut u8 = transmute(&mut dest);
2121
let src_ptr: *u8 = transmute(src);

0 commit comments

Comments
 (0)